summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--findutils/grep.c7
-rw-r--r--include/usage.h5
2 files changed, 4 insertions, 8 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,
};
diff --git a/include/usage.h b/include/usage.h
index 4568fac..3859481 100644
--- a/include/usage.h
+++ b/include/usage.h
@@ -1531,8 +1531,7 @@
"\n -H HOST Log HOST into the utmp file as the hostname" \
#define grep_trivial_usage \
- "[-HhnlLoqvsri" \
- IF_DESKTOP("w") \
+ "[-HhnlLoqvsriw" \
"F" \
IF_FEATURE_GREP_EGREP_ALIAS("E") \
IF_EXTRA_COMPAT("z") \
@@ -1554,9 +1553,7 @@
"\n -s Suppress open and read errors" \
"\n -r Recurse" \
"\n -i Ignore case" \
- IF_DESKTOP( \
"\n -w Match whole words only" \
- ) \
"\n -F PATTERN is a literal (not regexp)" \
IF_FEATURE_GREP_EGREP_ALIAS( \
"\n -E PATTERN is an extended regexp" \