Add in grep -E support
This commit is contained in:
parent
c223ced0ea
commit
dba4e6f046
@ -253,6 +253,9 @@ extern int grep_main(int argc, char **argv)
|
|||||||
#ifdef CONFIG_FEATURE_GREP_CONTEXT
|
#ifdef CONFIG_FEATURE_GREP_CONTEXT
|
||||||
"A:B:C:"
|
"A:B:C:"
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef CONFIG_FEATURE_GREP_EGREP_ALIAS
|
||||||
|
"E"
|
||||||
|
#endif
|
||||||
)) > 0) {
|
)) > 0) {
|
||||||
switch (opt) {
|
switch (opt) {
|
||||||
case 'i':
|
case 'i':
|
||||||
@ -285,6 +288,11 @@ extern int grep_main(int argc, char **argv)
|
|||||||
case 'e':
|
case 'e':
|
||||||
add_regex(optarg);
|
add_regex(optarg);
|
||||||
break;
|
break;
|
||||||
|
#ifdef CONFIG_FEATURE_GREP_EGREP_ALIAS
|
||||||
|
case 'E':
|
||||||
|
reflags |= REG_EXTENDED;
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
case 'f':
|
case 'f':
|
||||||
load_regexes_from_file(optarg);
|
load_regexes_from_file(optarg);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user