Skip to content

Commit

Permalink
diff: added missing flags
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Feb 29, 2024
1 parent 4925696 commit 8031332
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions completers/diff_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,19 @@ func Execute() error {
func init() {
carapace.Gen(rootCmd).Standalone()

rootCmd.Flags().StringS("C", "C", "", "output NUM (default 3) lines of copied context")
rootCmd.Flags().String("GTYPE-group-format", "", "format GTYPE input groups with GFMT")
rootCmd.Flags().String("LTYPE-line-format", "", "format LTYPE input lines with LFMT")
rootCmd.Flags().StringS("U", "U", "", "output NUM (default 3) lines of unified context")
rootCmd.Flags().BoolP("brief", "q", false, "report only when files differ")
rootCmd.Flags().String("changed-group-format", "", "set changed group format")
rootCmd.Flags().String("color", "", "colorize the output")
rootCmd.Flags().String("context", "", "output NUM (default 3) lines of copied context")
rootCmd.Flags().StringP("context", "c", "", "output NUM (default 3) lines of copied context")
rootCmd.Flags().BoolP("ed", "e", false, "output an ed script")
rootCmd.Flags().StringP("exclude", "x", "", "exclude files that match PAT")
rootCmd.Flags().StringP("exclude-from", "X", "", "exclude files that match any pattern in FILE")
rootCmd.Flags().BoolP("expand-tabs", "t", false, "expand tabs to spaces in output")
rootCmd.Flags().BoolP("forward-ed", "f", false, "output a reversed ed script")
rootCmd.Flags().String("from-file", "", "compare FILE1 to all operands")
rootCmd.Flags().Bool("help", false, "display this help and exit")
rootCmd.Flags().String("horizon-lines", "", "keep NUM lines of the common prefix and suffix")
Expand All @@ -41,14 +45,18 @@ func init() {
rootCmd.Flags().BoolP("ignore-tab-expansion", "E", false, "ignore changes due to tab expansion")
rootCmd.Flags().BoolP("ignore-trailing-space", "Z", false, "ignore white space at line end")
rootCmd.Flags().BoolP("initial-tab", "T", false, "make tabs line up by prepending a tab")
rootCmd.Flags().String("label", "", "use LABEL instead of file name and timestamp")
rootCmd.Flags().StringP("label", "L", "", "use LABEL instead of file name and timestamp")
rootCmd.Flags().Bool("left-column", false, "output only the left column of common lines")
rootCmd.Flags().String("line-format", "", "format all input lines with LFMT")
rootCmd.Flags().BoolP("minimal", "d", false, "try hard to find a smaller set of changes")
rootCmd.Flags().BoolP("new-file", "N", false, "treat absent files as empty")
rootCmd.Flags().String("new-group-format", "", "set new group format")
rootCmd.Flags().String("new-line-format", "", "set new line format")
rootCmd.Flags().Bool("no-dereference", false, "don't follow symbolic links")
rootCmd.Flags().Bool("no-ignore-file-name-case", false, "consider case when comparing file names")
rootCmd.Flags().Bool("normal", false, "output a normal diff (the default)")
rootCmd.Flags().String("old-group-format", "", "set old group format")
rootCmd.Flags().String("old-line-format", "", "set old line format")
rootCmd.Flags().BoolP("paginate", "l", false, "pass output through 'pr' to paginate it")
rootCmd.Flags().String("palette", "", "the colors to use when --color is active")
rootCmd.Flags().BoolP("rcs", "n", false, "output an RCS format diff")
Expand All @@ -57,19 +65,24 @@ func init() {
rootCmd.Flags().BoolP("show-c-function", "p", false, "show which C function each change is in")
rootCmd.Flags().StringP("show-function-line", "F", "", "show the most recent line matching RE")
rootCmd.Flags().BoolP("side-by-side", "y", false, "output in two columns")
rootCmd.Flags().Bool("speed-large-files", false, "assume large files and many scattered small changes")
rootCmd.Flags().BoolP("speed-large-files", "H", false, "assume large files and many scattered small changes")
rootCmd.Flags().StringP("starting-file", "S", "", "start with FILE when comparing directories")
rootCmd.Flags().Bool("strip-trailing-cr", false, "strip trailing carriage return on input")
rootCmd.Flags().Bool("suppress-blank-empty", false, "suppress space or tab before empty output lines")
rootCmd.Flags().Bool("suppress-common-lines", false, "do not output common lines")
rootCmd.Flags().String("tabsize", "", "tab stops every NUM (default 8) print columns")
rootCmd.Flags().BoolP("text", "a", false, "treat all files as text")
rootCmd.Flags().String("to-file", "", "compare all operands to FILE2")
rootCmd.Flags().Bool("unidirectional-new-file", false, "treat absent first files as empty")
rootCmd.Flags().String("unified", "", "output NUM (default 3) lines of unified context")
rootCmd.Flags().String("unchanged-group-format", "", "set unchanged group format")
rootCmd.Flags().String("unchanged-line-format", "", "set unchanged line format")
rootCmd.Flags().BoolP("unidirectional-new-file", "P", false, "treat absent first files as empty")
rootCmd.Flags().StringP("unified", "u", "", "output NUM (default 3) lines of unified context")
rootCmd.Flags().BoolP("version", "v", false, "output version information and exit")
rootCmd.Flags().StringP("width", "W", "", "output at most NUM (default 130) print columns")

rootCmd.MarkFlagsMutuallyExclusive("context", "C")
rootCmd.MarkFlagsMutuallyExclusive("unified", "U")

rootCmd.Flag("GTYPE-group-format").NoOptDefVal = " "
rootCmd.Flag("LTYPE-line-format").NoOptDefVal = " "
rootCmd.Flag("color").NoOptDefVal = " "
Expand Down

0 comments on commit 8031332

Please sign in to comment.