diff options
-rwxr-xr-x | bin/grepc | 10 | ||||
-rw-r--r-- | share/man/man1/grepc.1 | 3 |
2 files changed, 10 insertions, 3 deletions
@@ -3,6 +3,7 @@ # Defaults: c='no'; +h='H'; i=''; l=''; k='no'; @@ -39,11 +40,14 @@ grepc_err() grepc_parse_cmd() { - while getopts "ciklt:" opt; do + while getopts "chiklt:" opt; do case "$opt" in c) c='yes'; ;; + h) + h='h'; + ;; i) i='i'; ;; @@ -232,11 +236,11 @@ grepc_search() grepc_patterns "$identifier" >"$patterns"; if test -z "$files"; then - pcre2grep -${i}${l}HMn -f "$patterns"; + pcre2grep -${h}${i}${l}HMn -f "$patterns"; else find $files -type f \ | xargs grep -${i}lPI -- "$identifier" \ - | xargs pcre2grep -${i}${l}HMn -f "$patterns"; + | xargs pcre2grep -${h}${i}${l}HMn -f "$patterns"; fi; } diff --git a/share/man/man1/grepc.1 b/share/man/man1/grepc.1 index fad8c88..0e01781 100644 --- a/share/man/man1/grepc.1 +++ b/share/man/man1/grepc.1 @@ -129,6 +129,9 @@ Only uses .RB ( u\fI*\fP ) are highlighted. .TP +.B \-h +Suppress the prefixing of file names on output. +.TP .B \-i Ignore case distinctions in .IR pattern . |