id = "fold" name = "fold" description = "Wrap long lines of input to a finite width." executables = ["fold"] [commands] format = 1 label = "Fold long lines" description = "Wrap lines of one or more files to a given width." quality = "ai-draft" base = "fig:fold" 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/fold.ts" license = "MIT" [[commands.field]] id = "width" label = "Line width" description = "Columns per line; default 80." type = "integer" option = ["-w"] sources = ["fig"] [[commands.field]] id = "spaces" label = "Break at spaces" description = "Fold after the last blank within the width." type = "boolean" option = ["-s"] sources = ["fig"] [[commands.field]] id = "bytes" label = "Count bytes" description = "Count width in bytes instead of columns." type = "boolean" option = ["-b"] sources = ["fig"] [[commands.field]] id = "files" label = "Files" type = "path" position = 0 multiple = true path = { kind = "file", role = "input" } sources = ["fig"] [[commands.task]] id = "fold_words" label = "Fold at word boundaries" fields = ["width", "spaces", "files"] required = ["files"] set = { spaces = [true] } [[commands.task]] id = "fold_width" label = "Fold to width" fields = ["width", "files"] required = ["width", "files"] [[commands.group]] id = "basic" label = "Basic" fields = ["width", "spaces", "files"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["bytes"]