diff options
-rw-r--r-- | findutils/grep.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/findutils/grep.c b/findutils/grep.c index 88de0d4ef..3e8ea9239 100644 --- a/findutils/grep.c +++ b/findutils/grep.c | |||
@@ -704,10 +704,15 @@ int grep_main(int argc UNUSED_PARAM, char **argv) | |||
704 | /* do normal option parsing */ | 704 | /* do normal option parsing */ |
705 | #if ENABLE_FEATURE_GREP_CONTEXT | 705 | #if ENABLE_FEATURE_GREP_CONTEXT |
706 | /* -H unsets -h; -C unsets -A,-B */ | 706 | /* -H unsets -h; -C unsets -A,-B */ |
707 | opts = getopt32(argv, | 707 | opts = getopt32long(argv, "^" |
708 | "^" OPTSTR_GREP "\0" "H-h:C-AB", | 708 | OPTSTR_GREP |
709 | "\0" | ||
710 | "H-h:C-AB", | ||
711 | "color\0" Optional_argument "\xff", | ||
709 | &pattern_head, &fopt, &max_matches, | 712 | &pattern_head, &fopt, &max_matches, |
710 | &lines_after, &lines_before, &Copt); | 713 | &lines_after, &lines_before, &Copt |
714 | , NULL | ||
715 | ); | ||
711 | 716 | ||
712 | if (opts & OPT_C) { | 717 | if (opts & OPT_C) { |
713 | /* -C unsets prev -A and -B, but following -A or -B | 718 | /* -C unsets prev -A and -B, but following -A or -B |