id = "rich" name = "Rich" description = "Render rich text, markdown, code and tables in the terminal." executables = ["rich"] [commands] format = 1 label = "Render with Rich" description = "Show a file, URL or markup with Rich formatting. Covers format, syntax and panel options only." quality = "ai-draft" base = "fig:rich" 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/rich.ts" license = "MIT" [[commands.field]] id = "source" label = "File, URL or text" type = "string" position = 0 sources = ["fig"] [[commands.field]] id = "markdown" label = "Render as markdown" type = "boolean" option = ["-m", "--markdown"] sources = ["fig"] [[commands.field]] id = "json" label = "Render as JSON" type = "boolean" option = ["-j", "--json"] sources = ["fig"] [[commands.field]] id = "csv" label = "Render CSV as table" type = "boolean" option = ["--csv"] sources = ["fig"] [[commands.field]] id = "syntax" label = "Syntax highlighting" type = "boolean" option = ["--syntax"] sources = ["fig"] [[commands.field]] id = "line_numbers" label = "Line numbers" type = "boolean" option = ["-n", "--line-numbers"] sources = ["fig"] [[commands.field]] id = "theme" label = "Syntax theme" type = "string" option = ["--theme"] suggestions = [{ value = "default", label = "default" }, { value = "github-dark", label = "github-dark" }, { value = "bw", label = "bw" }, { value = "xcode", label = "xcode" }] sources = ["fig"] [[commands.field]] id = "head" label = "First N lines" type = "integer" option = ["-h", "--head"] sources = ["fig"] [[commands.field]] id = "tail" label = "Last N lines" type = "integer" option = ["-t", "--tail"] sources = ["fig"] [[commands.field]] id = "panel" label = "Panel box" type = "string" option = ["-a", "--panel"] suggestions = [{ value = "rounded", label = "rounded" }, { value = "square", label = "square" }, { value = "double", label = "double" }, { value = "heavy", label = "heavy" }, { value = "ascii", label = "ascii" }] sources = ["fig"] [[commands.field]] id = "title" label = "Panel title" type = "string" option = ["--title"] sources = ["fig"] [[commands.field]] id = "pager" label = "Use pager" type = "boolean" option = ["--pager"] sources = ["fig"] [[commands.task]] id = "markdown" label = "View markdown" set = { markdown = [true] } lock = ["markdown"] fields = ["source", "markdown", "pager"] required = ["source"] [[commands.task]] id = "code" label = "View highlighted code" set = { syntax = [true], line_numbers = [true] } fields = ["source", "syntax", "line_numbers", "theme", "head", "tail"] required = ["source"] [[commands.group]] id = "basic" label = "Basic" fields = ["source", "markdown", "json", "csv", "syntax", "line_numbers", "pager"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["theme", "head", "tail", "panel", "title"]