id = "cp" name = "cp" description = "Copy files and directories." executables = ["cp"] [commands] format = 1 label = "Copy files" description = "Copy one or more sources to a target. Symlink-handling options (-H, -L, -P) and macOS-specific options are left out." quality = "ai-draft" base = "fig:cp" parser = { end_of_options = "--", interleave = "permute", long_equals = false, short_attached = true, short_bundles = true } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/cp.ts" license = "MIT" [[commands.field]] id = "recursive" label = "Copy directories recursively" type = "boolean" option = ["-R"] sources = ["fig"] [[commands.field]] id = "archive" label = "Archive (preserve attributes)" type = "boolean" option = ["-a"] sources = ["fig"] [[commands.field]] id = "interactive" label = "Prompt before overwriting" type = "boolean" option = ["-i"] sources = ["fig"] [[commands.field]] id = "no_clobber" label = "Never overwrite existing files" type = "boolean" option = ["-n"] sources = ["fig"] [[commands.field]] id = "force" label = "Force (remove unopenable destination)" type = "boolean" option = ["-f"] effect = "overwrite" sources = ["fig"] [[commands.field]] id = "verbose" label = "Verbose" type = "boolean" option = ["-v"] sources = ["fig"] [[commands.field]] id = "source" label = "Sources" type = "path" path = { kind = "any", role = "input", must_exist = true } position = 0 multiple = true min = 1 sources = ["fig"] [[commands.field]] id = "target" label = "Target" type = "path" path = { kind = "any", role = "output" } position = 1 min = 1 sources = ["fig"] [[commands.task]] id = "copy-dir" label = "Copy a directory" set = { recursive = [true] } lock = ["recursive"] fields = ["source", "target", "no_clobber", "verbose"] required = ["source", "target"] [[commands.task]] id = "safe-copy" label = "Copy without overwriting" set = { no_clobber = [true] } lock = ["no_clobber"] fields = ["source", "target", "recursive", "verbose"] required = ["source", "target"] [[commands.group]] id = "basic" label = "Basic" fields = ["source", "target", "recursive", "verbose"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["archive", "interactive", "no_clobber", "force"]