summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbin/grepc4
1 files changed, 1 insertions, 3 deletions
diff --git a/bin/grepc b/bin/grepc
index 40460e1..23c9e3c 100755
--- 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