diff --git a/toot/commands.py b/toot/commands.py index 9df6a6f..0a76590 100644 --- a/toot/commands.py +++ b/toot/commands.py @@ -15,9 +15,8 @@ from toot.utils import args_get_instance, delete_tmp_status_file, editor_input, def get_timeline_generator(app, user, args): - # Make sure tag, list and public are not used simultaneously - if len([arg for arg in [args.tag, args.list, args.public, args.account_tl] if arg]) > 1: - raise ConsoleError("Only one of --public, --tag, --account_tl, or --list can be used at one time.") + if len([arg for arg in [args.tag, args.list, args.public, args.account] if arg]) > 1: + raise ConsoleError("Only one of --public, --tag, --account, or --list can be used at one time.") if args.local and not (args.public or args.tag): raise ConsoleError("The --local option is only valid alongside --public or --tag.") @@ -35,7 +34,7 @@ def get_timeline_generator(app, user, args): return api.anon_tag_timeline_generator(args.instance, args.tag, limit=args.count) else: return api.tag_timeline_generator(app, user, args.tag, local=args.local, limit=args.count) - elif args.account_tl: + elif args.account: return api.account_timeline_generator(app, user, args.account, limit=args.count) elif args.list: return api.timeline_list_generator(app, user, args.list, limit=args.count) diff --git a/toot/console.py b/toot/console.py index f1eab39..14433aa 100644 --- a/toot/console.py +++ b/toot/console.py @@ -238,10 +238,9 @@ common_timeline_args = [ "type": str, "help": "show hashtag timeline (does not require auth)", }), - (["-at", "--account_tl"], { - "action": "store_true", - "default": False, - "help": "show account timeline (requires account name)", + (["-a", "--account"], { + "type": str, + "help": "show timeline for the given account", }), (["-l", "--local"], { "action": "store_true", @@ -256,10 +255,6 @@ common_timeline_args = [ "type": str, "help": "show timeline for given list.", }), - (["account"], { - "nargs": "?", - "help": "account name, e.g. 'Gargron@mastodon.social'", - }), ] timeline_and_bookmark_args = [