diff options
Diffstat (limited to '')
-rw-r--r-- | src/later/cli.py | 6 | ||||
-rw-r--r-- | src/later/main.py | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/later/cli.py b/src/later/cli.py index 809632f..ece41ce 100644 --- a/src/later/cli.py +++ b/src/later/cli.py @@ -54,7 +54,7 @@ def list_entries(args, entries): entries.print() -def parse_args(argv, default, default_args): +def parse_args(argv): commands = { "add": Command("add", add_entries), "del": Command("del", delete_entries), @@ -66,7 +66,7 @@ def parse_args(argv, default, default_args): except getopt.GetoptError as e: usage(e) - parsed_args = Arguments(command=commands[default]) + parsed_args = Arguments(command=commands["list"]) for option in options: match option: @@ -77,7 +77,7 @@ def parse_args(argv, default, default_args): if args[0] in commands: parsed_args.command = commands[args.pop(0)] else: - parsed_args.command = commands[default_args] + parsed_args.command = commands["add"] parsed_args.rest = args diff --git a/src/later/main.py b/src/later/main.py index 1d07cac..6bf2426 100644 --- a/src/later/main.py +++ b/src/later/main.py @@ -17,7 +17,7 @@ title_map_file = os.path.join(later_cache_dir, "titles.json") def main(): - args = parse_args(sys.argv[1:], "list", "add") + args = parse_args(sys.argv[1:]) title_map = TitleMap(title_map_file, update=args.update_titles) entries = EntryManager(watch_later_dir, title_map) |