id = "colordiff"
name = "colordiff"
homepage = "https://www.colordiff.org/"
description = "The Perl script colordiff is a wrapper for 'diff' and produces the same output but with pretty 'syntax' highlighting."
executables = ["colordiff"]
[dotfiles]
paths = ["~/.colordiffrc"]
secret = []
side_effect = false
[commands]
format = 1
label = "Compare two files in colour"
description = "Run colordiff on two files, which wraps diff and colours its output. Other options are passed through to diff and are not modelled here; use `diff ... | colordiff` for piped input."
quality = "ai-draft"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = false, short_bundles = false }
[[commands.source]]
id = "help"
kind = "manual"
url = "https://manpages.debian.org/unstable/colordiff/colordiff.1.en.html"
revision = "debian unstable"
evidence = """
colordiff will send most options through to diff, but there are various colordiff-specific options which can be used:
--help
--color=(yes|no)
Force (or suppress) display of colours in output
--color-term-output-only
Force colour to only appear in terminal output
--difftype=DIFFTYPE
Force difftype detection to specified format. DIFFTYPE can be: diff, diffc, diffu, diffy, debdiff, wdiff
colordiff --fakeexitcode ...
"""
[[commands.field]]
id = "color"
label = "Colour output"
description = "Force or suppress colour codes."
type = "enum"
option = ["--color"]
choices = [{ value = "yes", label = "Force colour" }, { value = "no", label = "Suppress colour" }]
sources = ["help"]
[[commands.field]]
id = "term_only"
label = "Colour only in a terminal"
type = "boolean"
option = ["--color-term-output-only"]
sources = ["help"]
[[commands.field]]
id = "difftype"
label = "Diff format"
description = "Force the diff format instead of auto-detecting it."
type = "enum"
option = ["--difftype"]
choices = [{ value = "diff", label = "diff" }, { value = "diffc", label = "diffc (context)" }, { value = "diffu", label = "diffu (unified)" }, { value = "diffy", label = "diffy (side by side)" }, { value = "debdiff", label = "debdiff" }, { value = "wdiff", label = "wdiff" }]
sources = ["help"]
[[commands.field]]
id = "fakeexitcode"
label = "Always exit 0"
description = "Force the exit code to zero instead of diff's exit code."
type = "boolean"
option = ["--fakeexitcode"]
sources = ["help"]
[[commands.field]]
id = "old_file"
label = "Old file"
type = "path"
position = 0
path = { kind = "file", role = "input", must_exist = true }
sources = ["help"]
[[commands.field]]
id = "new_file"
label = "New file"
type = "path"
position = 1
path = { kind = "file", role = "input", must_exist = true }
sources = ["help"]
[[commands.task]]
id = "compare"
label = "Compare two files"
fields = ["old_file", "new_file", "difftype", "color"]
required = ["old_file", "new_file"]
[[commands.group]]
id = "basic"
label = "Basic"
fields = ["old_file", "new_file", "difftype"]
[[commands.group]]
id = "advanced"
label = "Advanced"
fields = ["color", "term_only", "fakeexitcode"]