]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
src/bin/grepc: -r, -l: Don't color the output of -l
authorAlejandro Colomar <alx@kernel.org>
Tue, 4 Nov 2025 14:27:30 +0000 (15:27 +0100)
committerAlejandro Colomar <alx@kernel.org>
Tue, 4 Nov 2025 14:27:35 +0000 (15:27 +0100)
Signed-off-by: Alejandro Colomar <alx@kernel.org>
src/bin/grepc

index 03db8e7effa4cd42dc3dc5d5796a3707700ccf5e..675e7da06718efbde493d93c39b934a1d8249c81 100755 (executable)
@@ -77,10 +77,9 @@ else
        fi \
        | xargs -0 sh -c 'pcre2grep $opts -f "$0" -- "$@" || test $? -eq 1;' "$patterns";
 fi \
-| grep -h --color="$r" -P "($identifier|^)" \
 | if test -n "$l"; then
        sort \
        | uniq;
 else
-       cat;
+       grep -h --color="$r" -P "($identifier|^)";
 fi;