id = "uniq" name = "uniq" description = "Report or omit repeated adjacent lines." executables = ["uniq"] [commands] format = 1 label = "Filter repeated lines" description = "Report or omit repeated adjacent lines in a file. Input must be sorted for global de-duplication." quality = "ai-draft" base = "fig:uniq" 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/uniq.ts" license = "MIT" [[commands.field]] id = "input" label = "Input file" description = "Reads standard input when empty." type = "path" position = 0 path = { kind = "file", role = "input", must_exist = true } sources = ["fig"] [[commands.field]] id = "output" label = "Output file" description = "Writes to standard output when empty." type = "path" position = 1 path = { kind = "file", role = "output", must_exist = false } effect = "overwrite" sources = ["fig"] [[commands.field]] id = "count" label = "Prefix with count" type = "boolean" option = ["-c", "--count"] sources = ["fig"] [[commands.field]] id = "repeated" label = "Only duplicated lines" type = "boolean" option = ["-d", "--repeated"] sources = ["fig"] [[commands.field]] id = "unique" label = "Only unique lines" type = "boolean" option = ["-u", "--unique"] sources = ["fig"] [[commands.field]] id = "ignore_case" label = "Ignore case" type = "boolean" option = ["-i", "--ignore-case"] sources = ["fig"] [[commands.field]] id = "skip_fields" label = "Skip first N fields" type = "integer" option = ["-f", "--skip-fields"] sources = ["fig"] [[commands.field]] id = "skip_chars" label = "Skip first N characters" type = "integer" option = ["-s", "--skip-chars"] sources = ["fig"] [[commands.field]] id = "check_chars" label = "Compare at most N characters" type = "integer" option = ["-w", "--check-chars"] sources = ["fig"] [[commands.task]] id = "count" label = "Count occurrences" set = { count = [true] } lock = ["count"] fields = ["input", "count", "ignore_case"] required = [] [[commands.task]] id = "dupes" label = "Show duplicates only" set = { repeated = [true] } lock = ["repeated"] fields = ["input", "repeated", "ignore_case"] required = [] [[commands.group]] id = "basic" label = "Basic" fields = ["input", "count", "repeated", "unique", "ignore_case", "output"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["skip_fields", "skip_chars", "check_chars"]