Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions falcon_toolkit/shell/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
5 changes: 4 additions & 1 deletion falcon_toolkit/shell/prompt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)