id = "grc"
name = "grc"
homepage = "https://kassiopeia.juls.savba.sk/~garabik/software/grc.html"
description = "Colorize logfiles and command output"
executables = ["grc"]
[dotfiles]
paths = ["~/.grc/conf.d/"]
secret = []
[commands]
format = 1
label = "Colourise a command"
description = "Run another command with its output colourised through grcat. The command is entered as one quoted string; the /etc/grc.conf rules are not edited here."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = false, short_bundles = true }
[[commands.source]]
id = "man"
kind = "manual"
url = "https://github.com/garabik/grc/blob/master/grc.1"
revision = "master 2026-10-27"
evidence = '''
grc [options] "command [args]"
-e --stderr Redirect error output.
-s --stdout Redirect standard output. Used to redirect standard output together with --stderr option.
--colour=x x is one of on off auto
--colour=on will colourise (default)
--colour=off will just execute command without colourising.
--colour=auto will test if standard output is a tty, and colourise only when it is.
'''
[[commands.field]]
id = "command"
label = "Command to run"
description = "The command and its arguments."
type = "string"
position = 0
multiple = true
sources = ["man"]
[[commands.field]]
id = "stderr"
label = "Colourise error output"
type = "boolean"
option = ["--stderr", "-e"]
sources = ["man"]
[[commands.field]]
id = "stdout"
label = "Colourise standard output too"
description = "Use together with Colourise error output."
type = "boolean"
option = ["--stdout", "-s"]
sources = ["man"]
[[commands.field]]
id = "colour"
label = "Colour mode"
type = "enum"
option = ["--colour"]
choices = [{ value = "on", label = "On (default)" }, { value = "off", label = "Off" }, { value = "auto", label = "Only when stdout is a tty" }]
sources = ["man"]
[[commands.task]]
id = "run"
label = "Colourise a command"
fields = ["command", "colour"]
required = ["command"]
[[commands.task]]
id = "both"
label = "Colourise stdout and stderr"
set = { stderr = [true], stdout = [true] }
lock = ["stderr", "stdout"]
fields = ["command", "stderr", "stdout"]
required = ["command"]
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["command", "colour"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["stderr", "stdout"]