summaryrefslogtreecommitdiff
path: root/findutils
diff options
context:
space:
mode:
Diffstat (limited to 'findutils')
-rw-r--r--findutils/grep.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/findutils/grep.c b/findutils/grep.c
index a321cc3..40caef4 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -24,10 +24,9 @@
/* options */
#define OPTSTR_GREP \
- "lnqvscFiHhe:f:Lorm:" \
+ "lnqvscFiHhe:f:Lorm:w" \
IF_FEATURE_GREP_CONTEXT("A:B:C:") \
IF_FEATURE_GREP_EGREP_ALIAS("E") \
- IF_DESKTOP("w") \
IF_EXTRA_COMPAT("z") \
"aI"
@@ -51,11 +50,11 @@ enum {
OPTBIT_o, /* show only matching parts of lines */
OPTBIT_r, /* recurse dirs */
OPTBIT_m, /* -m MAX_MATCHES */
+ OPTBIT_w, /* -w whole word match */
IF_FEATURE_GREP_CONTEXT( OPTBIT_A ,) /* -A NUM: after-match context */
IF_FEATURE_GREP_CONTEXT( OPTBIT_B ,) /* -B NUM: before-match context */
IF_FEATURE_GREP_CONTEXT( OPTBIT_C ,) /* -C NUM: -A and -B combined */
IF_FEATURE_GREP_EGREP_ALIAS(OPTBIT_E ,) /* extended regexp */
- IF_DESKTOP( OPTBIT_w ,) /* whole word match */
IF_EXTRA_COMPAT( OPTBIT_z ,) /* input is NUL terminated */
OPT_l = 1 << OPTBIT_l,
OPT_n = 1 << OPTBIT_n,
@@ -73,11 +72,11 @@ enum {
OPT_o = 1 << OPTBIT_o,
OPT_r = 1 << OPTBIT_r,
OPT_m = 1 << OPTBIT_m,
+ OPT_w = 1 << OPTBIT_w,
OPT_A = IF_FEATURE_GREP_CONTEXT( (1 << OPTBIT_A)) + 0,
OPT_B = IF_FEATURE_GREP_CONTEXT( (1 << OPTBIT_B)) + 0,
OPT_C = IF_FEATURE_GREP_CONTEXT( (1 << OPTBIT_C)) + 0,
OPT_E = IF_FEATURE_GREP_EGREP_ALIAS((1 << OPTBIT_E)) + 0,
- OPT_w = IF_DESKTOP( (1 << OPTBIT_w)) + 0,
OPT_z = IF_EXTRA_COMPAT( (1 << OPTBIT_z)) + 0,
};