Skip to content

Commit b513491

Browse files
committed
Short aliases for sub-commands
1 parent 5fc9532 commit b513491

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

reolinkfw/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ def main() -> None:
6666
pcache = ArgumentParser(add_help=False)
6767
pcache.add_argument("--no-cache", action="store_true", help="don't use cache for remote files (URLs)")
6868

69-
parser_i = subparsers.add_parser("info", parents=[pcache])
69+
parser_i = subparsers.add_parser("info", parents=[pcache], aliases=['i'])
7070
parser_i.add_argument("file_or_url", help="URL or on-disk file")
7171
parser_i.add_argument("-j", "--json", nargs='?', type=int, const=-1, metavar="indent", help="JSON output with optional indentation level for pretty print")
7272
parser_i.set_defaults(func=info)
7373

7474
descex = "Extract the file system from a Reolink firmware"
75-
parser_e = subparsers.add_parser("extract", parents=[pcache], help=descex.lower(), description=descex)
75+
parser_e = subparsers.add_parser("extract", parents=[pcache], aliases=['e'], help=descex.lower(), description=descex)
7676
parser_e.add_argument("file_or_url", help="URL or on-disk file")
7777
parser_e.add_argument("-d", "--dest", type=Path, help="destination directory. Default: current directory")
7878
parser_e.add_argument("-f", "--force", action="store_true", help="overwrite existing files. Does not apply to UBIFS. Default: %(default)s")

0 commit comments

Comments
 (0)