id = "diff" name = "diff" description = "Compare files line by line." executables = ["diff"] [commands] format = 1 label = "Compare files" description = "Compare two files or directories and print the differences. Output-format templates (--*-format) are left out." quality = "ai-draft" base = "fig:diff" 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/diff.ts" license = "MIT" [[commands.field]] id = "left" label = "First file or directory" type = "path" path = { kind = "any", role = "input" } position = 0 sources = ["fig"] [[commands.field]] id = "right" label = "Second file or directory" type = "path" path = { kind = "any", role = "input" } position = 1 sources = ["fig"] [[commands.field]] id = "unified" label = "Unified format" type = "boolean" option = ["-u"] sources = ["fig"] [[commands.field]] id = "recursive" label = "Compare directories recursively" type = "boolean" option = ["--recursive", "-r"] sources = ["fig"] [[commands.field]] id = "brief" label = "Only report whether files differ" type = "boolean" option = ["--brief", "-q"] sources = ["fig"] [[commands.field]] id = "side_by_side" label = "Side by side" type = "boolean" option = ["--side-by-side", "-y"] sources = ["fig"] [[commands.field]] id = "ignore_case" label = "Ignore case" type = "boolean" option = ["--ignore-case", "-i"] sources = ["fig"] [[commands.field]] id = "ignore_all_space" label = "Ignore all white space" type = "boolean" option = ["--ignore-all-space", "-w"] sources = ["fig"] [[commands.field]] id = "ignore_space_change" label = "Ignore changes in amount of white space" type = "boolean" option = ["--ignore-space-change", "-b"] sources = ["fig"] [[commands.field]] id = "new_file" label = "Treat absent files as empty" type = "boolean" option = ["--new-file", "-N"] sources = ["fig"] [[commands.field]] id = "exclude" label = "Exclude pattern" type = "string" option = ["--exclude", "-x"] multiple = true sources = ["fig"] [[commands.task]] id = "patch" label = "Unified diff of two files" set = { unified = [true] } fields = ["left", "right", "unified", "ignore_all_space"] required = ["left", "right"] [[commands.task]] id = "trees" label = "Compare two directories" set = { recursive = [true], brief = [true] } fields = ["left", "right", "recursive", "brief", "exclude"] required = ["left", "right"] [[commands.group]] id = "basic" label = "Basic" fields = ["left", "right", "unified", "recursive", "brief", "side_by_side"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["ignore_case", "ignore_all_space", "ignore_space_change", "new_file", "exclude"]