Command::styles
styles
Section titled “styles ”Sets the Styles
for terminal output.
Example
Section titled “Example”name = "myprog"[styles]header = { fg = "blue", bg = "#f0f0f0", underline = 7, effects = ["bold", "italic"] }error = { fg = "bright-red" }usage = { fg = "green" }literal = { fg = "magenta" }placeholder = { fg = "white" }valid = { fg = "bright-green" }invalid = { fg = "#ff0000" }context = { fg = "yellow", bg = "#000000", effects = ["bold"] }context-value = { fg = "cyan", bg = "#000000", effects = ["bold"] }[args]foo = { help = "It does foo stuff", short = 'f', long = "foo", value-name = "FOO", default-value = "bar", env = "MY_FOO", action = "set" }
name: myprogstyles: header: fg: blue bg: '#f0f0f0' underline: 7 effects: - bold - italic error: fg: bright-red usage: fg: green literal: fg: magenta placeholder: fg: white valid: fg: bright-green invalid: fg: '#ff0000' context: fg: yellow bg: '#000000' effects: - bold context-value: fg: cyan bg: '#000000' effects: - boldargs: foo: help: It does foo stuff short: f long: foo value-name: FOO default-value: bar env: MY_FOO action: set
{ "name": "myprog", "styles": { "header": { "fg": "blue", "bg": "#f0f0f0", "underline": 7, "effects": [ "bold", "italic" ] }, "error": { "fg": "bright-red" }, "usage": { "fg": "green" }, "literal": { "fg": "magenta" }, "placeholder": { "fg": "white" }, "valid": { "fg": "bright-green" }, "invalid": { "fg": "#ff0000" }, "context": { "fg": "yellow", "bg": "#000000", "effects": [ "bold" ] }, "context-value": { "fg": "cyan", "bg": "#000000", "effects": [ "bold" ] } }, "args": { "foo": { "help": "It does foo stuff", "short": "f", "long": "foo", "value-name": "FOO", "default-value": "bar", "env": "MY_FOO", "action": "set" } }}
myprog --help
Output
Section titled “Output”Usage: myprog [OPTIONS]
Options: -f, --foo <FOO> It does foo stuff [env: MY_FOO=] [default: bar] -h, --help Print help