diff --git a/falcon_toolkit/shell/parsers.py b/falcon_toolkit/shell/parsers.py index 3c8d872..772440e 100644 --- a/falcon_toolkit/shell/parsers.py +++ b/falcon_toolkit/shell/parsers.py @@ -693,6 +693,13 @@ "destination", help="Target zip file name. Relative or absolute path.", ) +zip_argparser.add_argument( + "-r", + "--recurse-paths", + help="[Linux/macOS] Travel the directory structure recursively", + action="store_true", + dest="recursive", +) _PARSERS = { "cat": cat_argparser, diff --git a/falcon_toolkit/shell/prompt.py b/falcon_toolkit/shell/prompt.py index 4c5031a..9c6d315 100644 --- a/falcon_toolkit/shell/prompt.py +++ b/falcon_toolkit/shell/prompt.py @@ -1096,5 +1096,8 @@ def do_xmemdump(self, args): @with_argparser(PARSERS.zip, preserve_quotes=True) def do_zip(self, args): """Compress a file or directory into a zip file.""" - command = f"zip {args.source} {args.destination}" + if args.recursive: + command = f"zip -r {args.source} {args.destination}" + else: + command = f"zip {args.source} {args.destination}" self.send_generic_command(command)