add some aliases for config sub command.

This commit is contained in:
Yoshihiro OKUMURA 2024-07-04 12:35:59 +09:00
parent 020ef8835a
commit 4696b9799c
Signed by: orrisroot
GPG Key ID: 470AA444C92904B2

View File

@ -25,11 +25,11 @@ class ConfigCommand(BaseCommand):
update_parser.add_argument("url", help="API entrypoint url of remote host")
update_parser.set_defaults(func=cls.func_update)
# config list
list_parser = config_parsers.add_parser("list", help="list all the remote hosts")
list_parser = config_parsers.add_parser("list", help="list all the remote hosts", aliases=["ls"])
list_parser.add_argument("-l", "--long", help="show the api url", action="store_true")
list_parser.set_defaults(func=cls.func_list)
# config delete
delete_parser = config_parsers.add_parser("delete", help="delete an existing remote host")
delete_parser = config_parsers.add_parser("delete", help="delete an existing remote host", aliases=["remove"])
delete_parser.add_argument("remote", help="label of remote host")
delete_parser.set_defaults(func=cls.func_delete)