diff --git a/check_shell_commands_dash_protections.sh b/check_shell_commands_dash_protections.sh index 1eabe912..93dd059c 100755 --- a/check_shell_commands_dash_protections.sh +++ b/check_shell_commands_dash_protections.sh @@ -35,7 +35,7 @@ help_usage "$@" check(){ local cmd="$1" - command git grep -E "\\<$cmd[[:space:]]+" | + command git grep -E "^[^#]*\\<$cmd[[:space:]]+" | grep -v -e '--' \ -e "${0##*/}:" \ -e '\.gitconfig:' \