id = "truncate" name = "truncate" description = "Shrinks or extends the size of files." executables = ["truncate"] [commands] format = 1 label = "Resize files" description = "Set or adjust file sizes. Shrinking a file discards the data past the new size." quality = "ai-draft" base = "fig:truncate" 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/truncate.ts" license = "MIT" [[commands.field]] id = "files" label = "Files" type = "path" position = 0 multiple = true path = { kind = "file", role = "output", must_exist = false } effect = "overwrite" sources = ["fig"] [[commands.field]] id = "size" label = "Size" description = "Bytes, with optional suffix; a leading + or - adjusts instead of sets." type = "string" option = ["--size", "-s"] sources = ["fig"] [[commands.field]] id = "reference" label = "Reference file" description = "Base the size on this file." type = "path" option = ["--reference", "-r"] path = { kind = "file", role = "input" } sources = ["fig"] [[commands.field]] id = "no_create" label = "Do not create files" type = "boolean" option = ["--no-create", "-c"] sources = ["fig"] [[commands.field]] id = "io_blocks" label = "Size in IO blocks" type = "boolean" option = ["--io-blocks", "-o"] sources = ["fig"] [[commands.task]] id = "resize" label = "Set size" fields = ["files", "size", "no_create"] required = ["files", "size"] [[commands.task]] id = "match" label = "Match another file" fields = ["files", "reference", "no_create"] required = ["files", "reference"] [[commands.group]] id = "basic" label = "Basic" fields = ["files", "size", "no_create"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["reference", "io_blocks"]