diff options
| author | Alejandro Colomar <alx@kernel.org> | 2025-10-29 22:01:59 +0100 |
|---|---|---|
| committer | Alejandro Colomar <alx@kernel.org> | 2025-10-29 22:14:12 +0100 |
| commit | ef48af47f6889a2b0954ba0486276cfc52c4733e (patch) | |
| tree | 70d10311e6c47c5c76504fb75e7541613fbc2ce6 | |
| parent | 6c78db3bb0f025f32fa6a5bdc46f110ce3ff6ff1 (diff) | |
| download | man-pages-ef48af47f6889a2b0954ba0486276cfc52c4733e.tar.gz | |
src/bin/grepc: Ignore shellcheck(1) diagnostics
Signed-off-by: Alejandro Colomar <alx@kernel.org>
| -rwxr-xr-x | src/bin/grepc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bin/grepc b/src/bin/grepc index 01f52235bd..00b6993792 100755 --- a/src/bin/grepc +++ b/src/bin/grepc @@ -52,6 +52,7 @@ grepc_err() while getopts "A:B:C:chilm:nrt:x:" opt; do + # shellcheck disable=SC2249 # getopts(1) uses '?' for an error. case "$opt" in A) A="-A$OPTARG"; ;;& B) B="-B$OPTARG"; ;;& @@ -68,6 +69,7 @@ while getopts "A:B:C:chilm:nrt:x:" opt; do x='c'; fi; + # shellcheck disable=SC2249 # Already validated under x). case "$x" in c) case "$OPTARG" in @@ -237,6 +239,7 @@ if test -z "$*"; then else find "$@" -type f -print0 \ | if test -z "$c"; then + # shellcheck disable=SC2248 # $i may be -i or nothing. xargs -0 grep -lZPI $i -- "$identifier"; else cat; @@ -244,6 +247,7 @@ else | xargs -0 pcre2grep "${opts[@]}" -f "$patterns"; fi \ | perl -p <( + # shellcheck disable=SC2312 # We don't care about failures here. test "$r" = 'yes' \ && printf '%s\n' 's/('"$identifier"')/\033[32m\1\033[0m/' \ || printf '%s\n' 's///'; |
