id = "install" name = "install" description = "Copy files and set attributes (mode, owner, group) on the copies." executables = ["install"] [commands] format = 1 label = "Install files" description = "Copy files to a destination with the given mode, owner and group, or create directories. The last path is the destination. File flags (-f) and mmap control (-M) are left out." quality = "ai-draft" base = "fig:install" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = true } [[commands.source]] id = "src" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/install.ts" license = "MIT" [[commands.field]] id = "paths" label = "Sources and destination" description = "Source files followed by the destination file or directory as the last entry." type = "path" position = 0 multiple = true path = { kind = "any", role = "input", must_exist = true } sources = ["src"] [[commands.field]] id = "mode" label = "Mode" description = "Octal or symbolic mode; the default is rwxr-xr-x (0755)." type = "string" option = ["-m"] suggestions = [{ value = "755", label = "755" }, { value = "644", label = "644" }, { value = "600", label = "600" }] sources = ["src"] [[commands.field]] id = "owner" label = "Owner" description = "Owner name or numeric UID." type = "string" option = ["-o"] sources = ["src"] [[commands.field]] id = "group" label = "Group" description = "Group name or numeric GID." type = "string" option = ["-g"] sources = ["src"] [[commands.field]] id = "mkdirs" label = "Create directories" description = "Create directories instead of copying; missing parents are created." type = "boolean" option = ["-d"] sources = ["src"] [[commands.field]] id = "backup" label = "Back up existing files" description = "Rename existing targets to file.old before overwriting." type = "boolean" option = ["-b"] effect = "overwrite" sources = ["src"] [[commands.field]] id = "backup_suffix" label = "Backup suffix" description = "Suffix used with the backup option." type = "string" option = ["-B"] sources = ["src"] [[commands.field]] id = "compare" label = "Compare and copy" description = "Do not change the target modification time when the files are the same." type = "boolean" option = ["-C"] sources = ["src"] [[commands.field]] id = "preserve" label = "Preserve modification time" description = "Preserve the source modification time." type = "boolean" option = ["-p"] sources = ["src"] [[commands.field]] id = "strip" label = "Strip binaries" description = "Run strip(1) on the installed binaries." type = "boolean" option = ["-s"] sources = ["src"] [[commands.field]] id = "safe" label = "Safe copy" description = "Install through a temporary file so a failed copy leaves the target untouched." type = "boolean" option = ["-S"] sources = ["src"] [[commands.field]] id = "verbose" label = "Verbose" description = "Show when compare-and-copy actually installs something." type = "boolean" option = ["-v"] sources = ["src"] [[commands.task]] id = "install_file" label = "Install files with a mode" fields = ["paths", "mode", "owner", "group"] required = ["paths"] [[commands.task]] id = "make_dirs" label = "Create directories" fields = ["paths", "mkdirs", "mode"] required = ["paths", "mkdirs"] set = { mkdirs = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["paths", "mode", "owner", "group", "mkdirs"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["backup", "backup_suffix", "compare", "preserve", "strip", "safe", "verbose"]