From b513491da586a7679d84088dd531b2167c9f7467 Mon Sep 17 00:00:00 2001 From: AT0myks Date: Mon, 18 Dec 2023 17:25:13 +0100 Subject: [PATCH] Short aliases for sub-commands --- reolinkfw/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reolinkfw/__main__.py b/reolinkfw/__main__.py index 25bef63..df886cb 100644 --- a/reolinkfw/__main__.py +++ b/reolinkfw/__main__.py @@ -66,13 +66,13 @@ def main() -> None: pcache = ArgumentParser(add_help=False) pcache.add_argument("--no-cache", action="store_true", help="don't use cache for remote files (URLs)") - parser_i = subparsers.add_parser("info", parents=[pcache]) + parser_i = subparsers.add_parser("info", parents=[pcache], aliases=['i']) parser_i.add_argument("file_or_url", help="URL or on-disk file") parser_i.add_argument("-j", "--json", nargs='?', type=int, const=-1, metavar="indent", help="JSON output with optional indentation level for pretty print") parser_i.set_defaults(func=info) descex = "Extract the file system from a Reolink firmware" - parser_e = subparsers.add_parser("extract", parents=[pcache], help=descex.lower(), description=descex) + parser_e = subparsers.add_parser("extract", parents=[pcache], aliases=['e'], help=descex.lower(), description=descex) parser_e.add_argument("file_or_url", help="URL or on-disk file") parser_e.add_argument("-d", "--dest", type=Path, help="destination directory. Default: current directory") parser_e.add_argument("-f", "--force", action="store_true", help="overwrite existing files. Does not apply to UBIFS. Default: %(default)s")