]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
bin/grepc: Don't use pcre2grep(1)'s --label
authorAlejandro Colomar <alx@kernel.org>
Fri, 3 Nov 2023 17:46:09 +0000 (18:46 +0100)
committerAlejandro Colomar <alx@kernel.org>
Wed, 29 Oct 2025 20:29:17 +0000 (21:29 +0100)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
bin/grepc

index 40460e123b33a78517d09ae7446af32dbe308a1f..23c9e3c9dfc2456993ca9bfa70dead2ae0dfab3d 100755 (executable)
--- a/bin/grepc
+++ b/bin/grepc
@@ -2,7 +2,6 @@
 
 
 # Defaults:
-file='/dev/stdin';
 iflag='';
 lflag='';
 kflag='no';
@@ -238,8 +237,7 @@ main()
 {
        grepc_parse_cmd "$@" </dev/null;
 
-       <"$file" \
-       pcre2grep -${iflag}${lflag}HMn --label="$file" -f <(grepc_patterns "$identifier") \
+       pcre2grep -${iflag}${lflag}HMn -f <(grepc_patterns "$identifier") $file \
        | sed -E -f <(test "$kflag" = 'no'  && echo 's/^[^: ]+:[0-9]+:/\n\n&\n/') \
        | perl -pe "$(test "$cflag" = 'yes' && echo 's/('"$identifier"')/\033[32m\1\033[0m/' || echo 's///')" \
        | if [ -n "$lflag" ]; then