Skip to content

Commit

Permalink
grep: color is an optarg flag
Browse files Browse the repository at this point in the history
  • Loading branch information
rsteube committed Aug 28, 2022
1 parent e20eea3 commit 940ca0c
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 940ca0c

Please sign in to comment.