Skip to content

Commit

Permalink
Merge pull request #1279 from rsteube/grep-color-optarg
Browse files Browse the repository at this point in the history
grep: color is an optarg flag
  • Loading branch information
rsteube authored Aug 30, 2022
2 parents e20eea3 + 940ca0c commit a4bd251
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions completers/grep_completer/cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@ func init() {
rootCmd.Flags().BoolP("with-filename", "H", false, "print file name with output lines")
rootCmd.Flags().BoolP("word-regexp", "w", false, "match only whole words")

rootCmd.Flag("color").NoOptDefVal = " "
rootCmd.Flag("colour").NoOptDefVal = " "

carapace.Gen(rootCmd).FlagCompletion(carapace.ActionMap{
"binary-files": carapace.ActionValues("binary", "test", "without-match"),
"color": carapace.ActionValues("auto", "never", "always").StyleF(style.ForKeyword),
Expand Down

0 comments on commit a4bd251

Please sign in to comment.