id = "ditto" name = "ditto" description = "Copy directory hierarchies and create or extract archives (macOS)." executables = ["ditto"] platforms = ["macos"] [commands] format = 1 label = "Copy or archive" description = "Copy a directory tree, or create/extract a CPIO or zip archive. Resource-fork, ACL and HFS compression switches are left out." quality = "ai-draft" base = "fig:ditto" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/ditto.ts" license = "MIT" [[commands.field]] id = "sources" label = "Source" type = "path" path = { kind = "any", role = "input" } position = 0 multiple = true sources = ["fig"] [[commands.field]] id = "dest" label = "Destination" type = "path" path = { kind = "any", role = "output" } position = 1 effect = "overwrite" sources = ["fig"] [[commands.field]] id = "create" label = "Create an archive" type = "boolean" option = ["-c"] sources = ["fig"] [[commands.field]] id = "extract" label = "Extract archive sources" type = "boolean" option = ["-x"] sources = ["fig"] [[commands.field]] id = "zip" label = "Use PKZip instead of CPIO" type = "boolean" option = ["-k"] sources = ["fig"] [[commands.field]] id = "keep_parent" label = "Embed parent directory name in archive" type = "boolean" option = ["--keepParent"] sources = ["fig"] [[commands.field]] id = "verbose" label = "Print each source directory copied" type = "boolean" option = ["-v"] sources = ["fig"] [[commands.field]] id = "one_device" label = "Do not cross device boundaries" type = "boolean" option = ["-X"] sources = ["fig"] [[commands.task]] id = "copy" label = "Copy a tree" fields = ["sources", "dest", "verbose", "one_device"] required = ["sources", "dest"] [[commands.task]] id = "zip" label = "Create a zip archive" set = { create = [true], zip = [true], keep_parent = [true] } lock = ["create", "zip"] fields = ["sources", "dest", "create", "zip", "keep_parent"] required = ["sources", "dest"] [[commands.task]] id = "unzip" label = "Extract a zip archive" set = { extract = [true], zip = [true] } lock = ["extract", "zip"] fields = ["sources", "dest", "extract", "zip"] required = ["sources", "dest"] [[commands.group]] id = "basic" label = "Basic" fields = ["sources", "dest", "create", "extract", "zip"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["keep_parent", "verbose", "one_device"]