id = "zip" name = "Zip" description = "zip packages and compresses files into a zip archive." executables = ["zip"] [commands] format = 1 label = "Create zip archive" description = "Add files or directories to a zip archive. Split archives and deleting entries are left out." quality = "ai-draft" base = "fig:zip" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/zip.ts" license = "MIT" [[commands.field]] id = "archive" label = "Archive name" description = "An existing archive is updated, not replaced." type = "path" position = 0 min = 1 path = { kind = "file", role = "output" } effect = "overwrite" sources = ["fig"] [[commands.field]] id = "files" label = "Files and directories" type = "path" position = 1 multiple = true min = 1 path = { kind = "any", role = "input", must_exist = true } sources = ["fig"] [[commands.field]] id = "recursive" label = "Recurse into directories" type = "boolean" option = ["-r"] sources = ["fig"] [[commands.field]] id = "encrypt" label = "Encrypt with a password" description = "zip prompts for the password." type = "boolean" option = ["-e"] sources = ["fig"] [[commands.field]] id = "best" label = "Best compression (-9)" type = "boolean" option = ["-9"] sources = ["fig"] [[commands.task]] id = "zip_dir" label = "Zip a directory" fields = ["archive", "files", "recursive"] required = ["archive", "files"] set = { recursive = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["archive", "files", "recursive"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["encrypt", "best"]