summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-05-10 12:42:01 +0200
committerAlejandro Colomar <alx@kernel.org>2024-05-10 12:44:17 +0200
commita7cb1672865ebabe4b989a916bc610f7f4399297 (patch)
tree89ade63f8657660824cc81d08ea7c0f024a5cd96 /bin
parent507d15a704587aea544b32cc9dc02086b93b8122 (diff)
bin/, man/: -m: Add flag, and pass it to pcre2grep(1)HEADmain
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/grepc6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/grepc b/bin/grepc
index df2978f..592306d 100755
--- a/bin/grepc
+++ b/bin/grepc
@@ -10,6 +10,7 @@ h='-H';
i='';
k='no';
l='';
+m='';
n='';
r='no';
t='no';
@@ -46,7 +47,7 @@ grepc_err()
}
-while getopts "A:B:C:chiklnrt:x:" opt; do
+while getopts "A:B:C:chiklm:nrt:x:" opt; do
case "$opt" in
A) A="-A$OPTARG"; ;;&
B) B="-B$OPTARG"; ;;&
@@ -56,6 +57,7 @@ while getopts "A:B:C:chiklnrt:x:" opt; do
i) i='-i'; ;;&
k | l) k='yes'; ;;&
l) l='-l'; ;;&
+ m) m="-m$OPTARG"; ;;&
n) n='-n'; ;;&
r) r='yes'; ;;&
t)
@@ -223,7 +225,7 @@ patterns="$(mktemp -t grepc.patterns.XXXXXX)";
# shellcheck disable=SC2206 # We want only non-empty variables in the array.
-opts=($A $B $C $c $h $i $l -M $n);
+opts=($A $B $C $c $h $i $l -M $m $n);
if test -z "$*"; then