mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
bash is more appropriate for .bashrc
@@ -7,12 +7,12 @@ Add a shebang line to the top of your script:
|
||||
Or, for scripts that will not be executed (*e.g.*, `~/.bashrc`), use a directive:
|
||||
|
||||
```bash
|
||||
# shellcheck shell=sh
|
||||
# shellcheck shell=bash
|
||||
```
|
||||
|
||||
If neither of those options are possible or desirable, you can invoke ShellCheck with the `--shell` switch:
|
||||
```bash
|
||||
shellcheck --shell=bash without-shebang.sh
|
||||
shellcheck --shell=sh without-shebang.sh
|
||||
```
|
||||
|
||||
See `shellcheck --help` for a list of supported flavors.
|
Reference in New Issue
Block a user