id = "cat" name = "cat" description = "Concatenate and print files." executables = ["cat"] [commands] format = 1 label = "Print files" description = "Concatenate files to standard output with optional line numbering and visible control characters. Reads standard input when no file is given." quality = "ai-draft" base = "fig:cat" 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/cat.ts" license = "MIT" [[commands.field]] id = "files" label = "Files" type = "path" position = 0 multiple = true path = { kind = "file", role = "input", must_exist = true } sources = ["fig"] [[commands.field]] id = "number" label = "Number all lines" type = "boolean" option = ["-n"] sources = ["fig"] [[commands.field]] id = "number_nonblank" label = "Number non-blank lines" type = "boolean" option = ["-b"] sources = ["fig"] [[commands.field]] id = "squeeze" label = "Squeeze blank lines" description = "Collapse multiple adjacent empty lines into one." type = "boolean" option = ["-s"] sources = ["fig"] [[commands.field]] id = "show_nonprinting" label = "Show non-printing characters" type = "boolean" option = ["-v"] sources = ["fig"] [[commands.field]] id = "show_ends" label = "Show line ends and non-printing" description = "Shows a dollar sign at the end of each line, plus non-printing characters." type = "boolean" option = ["-e"] sources = ["fig"] [[commands.field]] id = "show_tabs" label = "Show tabs and non-printing" description = "Displays tab characters as ^I, plus non-printing characters." type = "boolean" option = ["-t"] sources = ["fig"] [[commands.field]] id = "unbuffered" label = "Unbuffered output" type = "boolean" option = ["-u"] sources = ["fig"] [[commands.task]] id = "print" label = "Print files" fields = ["files"] required = ["files"] [[commands.task]] id = "numbered" label = "Print with line numbers" fields = ["files", "number", "squeeze"] required = ["files"] set = { number = [true] } [[commands.task]] id = "invisibles" label = "Reveal tabs and line ends" fields = ["files", "show_tabs", "show_ends"] required = ["files"] set = { show_tabs = [true], show_ends = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["files", "number", "number_nonblank", "squeeze"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["show_nonprinting", "show_ends", "show_tabs", "unbuffered"]