mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Update sample (was SC1071); add related resources
13
SC1103.md
13
SC1103.md
@@ -3,7 +3,8 @@
|
|||||||
### Problematic code:
|
### Problematic code:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/bin/zsh
|
# shellcheck shell=zsh
|
||||||
|
export PAGER=less
|
||||||
```
|
```
|
||||||
|
|
||||||
### Correct code:
|
### Correct code:
|
||||||
@@ -11,7 +12,8 @@
|
|||||||
Any supported shell on the shebang or the `-s` option
|
Any supported shell on the shebang or the `-s` option
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
#!/bin/sh
|
# shellcheck shell=sh
|
||||||
|
export PAGER=less
|
||||||
```
|
```
|
||||||
|
|
||||||
### Rationale:
|
### Rationale:
|
||||||
@@ -28,3 +30,10 @@ The supported shell types are listed in the help context, at the moment these ar
|
|||||||
* bash
|
* bash
|
||||||
* dash
|
* dash
|
||||||
* ksh
|
* ksh
|
||||||
|
|
||||||
|
### Related resources:
|
||||||
|
|
||||||
|
- Similar rules
|
||||||
|
- [[SC1008]] - unrecognized shebang
|
||||||
|
- [[SC1071]] - unsupported shebang
|
||||||
|
- [[Documentation for shell directive|Directive#shell]]
|
||||||
|
Reference in New Issue
Block a user