removing need for globstar

Pat Myron
2019-03-30 23:02:51 -04:00
parent 742d4042b8
commit d09d758e44

@@ -16,12 +16,11 @@ To check files with one of multiple extensions:
``` ```
# Bash 4+ # Bash 4+
# globstar makes ** recursive. # nullglob will prevent one of the extension patterns from appearing in the arg list
# nullglob will prevent one of the extension pattens from appearing in the arg list
# if they don't match. # if they don't match.
# dotglob will match shell scripts in hidden directories. # dotglob will match shell scripts in hidden directories.
shopt -s globstar nullglob dotglob shopt -s globstar nullglob dotglob
shellcheck /path/to/scripts/**/*.{sh,bash,ksh,bashrc,bash_profile,bash_login,bash_logout} shellcheck /path/to/scripts/**.{sh,bash,ksh,bashrc,bash_profile,bash_login,bash_logout}
# POSIX # POSIX
find /path/to/scripts -type f \( -name "*.sh" -o -name "*.bash" -o -name "*.ksh" -o -name "*.bashrc" -o -name "*.bash_profile" -o -name "*.bash_login" -o -name "*.bash_logout" \) -print | find /path/to/scripts -type f \( -name "*.sh" -o -name "*.bash" -o -name "*.ksh" -o -name "*.bashrc" -o -name "*.bash_profile" -o -name "*.bash_login" -o -name "*.bash_logout" \) -print |