← Commit list

8717b14f3

Denys Vlasenko
Denys Vlasenko
2018-07-13
SUCCESS Duration: 148s

Subject

grep: accept and ignore --color[=anything]

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

findutils/grep.c+8 -3
@@ -704,10 +704,15 @@ int grep_main(int argc UNUSED_PARAM, char **argv)
/* do normal option parsing */
#if ENABLE_FEATURE_GREP_CONTEXT
/* -H unsets -h; -C unsets -A,-B */
- opts = getopt32(argv,
- "^" OPTSTR_GREP "\0" "H-h:C-AB",
+ opts = getopt32long(argv, "^"
+ OPTSTR_GREP
+ "\0"
+ "H-h:C-AB",
+ "color\0" Optional_argument "\xff",
&pattern_head, &fopt, &max_matches,
- &lines_after, &lines_before, &Copt);
+ &lines_after, &lines_before, &Copt
+ , NULL
+ );
if (opts & OPT_C) {
/* -C unsets prev -A and -B, but following -A or -B