Equivalent to grep(1)'s -h, except that we always default to -H behavior.
Signed-off-by: Alejandro Colomar <alx@kernel.org>
# Defaults:
c='no';
+h='H';
i='';
l='';
k='no';
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';
;;
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;
}
.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 .