bash is more appropriate for .bashrc

gaellick
2020-04-13 11:55:25 +02:00
parent b7d25aec1d
commit 9ec4464fec

@@ -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: Or, for scripts that will not be executed (*e.g.*, `~/.bashrc`), use a directive:
```bash ```bash
# shellcheck shell=sh # shellcheck shell=bash
``` ```
If neither of those options are possible or desirable, you can invoke ShellCheck with the `--shell` switch: If neither of those options are possible or desirable, you can invoke ShellCheck with the `--shell` switch:
```bash ```bash
shellcheck --shell=bash without-shebang.sh shellcheck --shell=sh without-shebang.sh
``` ```
See `shellcheck --help` for a list of supported flavors. See `shellcheck --help` for a list of supported flavors.