diff --git a/SC2148.md b/SC2148.md index da3d49c..b7ce259 100644 --- a/SC2148.md +++ b/SC2148.md @@ -1,4 +1,4 @@ -## Include a shebang (#!) to specify the shell. +## Shebang (#!) missing. Assuming Bash. ### Problematic code: @@ -11,12 +11,10 @@ ### Rationale: -ShellCheck noticed that your file does not start with a shebang. Shebangs are good for a number of reasons: +ShellCheck warns about different things for different shells. It uses the shebang to determine which shell to warn for. For the command line client, this can be overridden with `-s`, e.g. `shellcheck -s sh file`. -* They allow scripts to be executed outside of interactive prompts. -* They ensure the script is executed by the correct shell. -* Editors and utilities (including shellcheck) use it to determine the file type. +If you don't specify the shell type in any way, ShellCheck assumes a default and gives this message. ### Contraindications -For checking snippets, use `shellcheck -e 2148`. This is the default for [shellcheck.net](http://www.shellcheck.net). \ No newline at end of file +None. Just specify the shell type, either in a shebang or as a cli flag. \ No newline at end of file