diff --git a/SC2148.md b/SC2148.md index 16afb5c..d825e0b 100644 --- a/SC2148.md +++ b/SC2148.md @@ -1,10 +1,16 @@ -Add shebang to the top of your script: +Add a shebang line to the top of your script: ```bash #!/bin/bash ``` -Alternatively, if that is not possible / desirable, you can use the `--shell` switch: +Or, for scripts that will not be executed (*e.g.*, `~/.bashrc`), use a directive: + +```bash +# shellcheck shell=sh +``` + +If neither of those options are possible or desirable, you can invoke ShellCheck with the `--shell` switch: ```bash shellcheck --shell=bash without-shebang.sh ```