mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-02-26 08:52:58 +00:00
Update cheatsheets
This commit is contained in:
@@ -12,30 +12,30 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
`shellcheck {{path/to/script.sh}}`
|
||||
|
||||
- Check a shell script interpreting it as the specified [s]hell dialect (overrides the shebang at the top of the script):
|
||||
- Check a shell script interpreting it as the specified shell dialect (overrides the shebang at the top of the script):
|
||||
|
||||
`shellcheck --shell {{sh|bash|dash|ksh}} {{path/to/script.sh}}`
|
||||
`shellcheck {{[-s|--shell]}} {{sh|bash|dash|ksh}} {{path/to/script.sh}}`
|
||||
|
||||
- Ignor[e] one or more error types:
|
||||
- Ignore one or more error types:
|
||||
|
||||
`shellcheck --exclude {{SC1009,SC1073,...}} {{path/to/script.sh}}`
|
||||
`shellcheck {{[-e|--exclude]}} {{SC1009,SC1073,...}} {{path/to/script.sh}}`
|
||||
|
||||
- Also check any sourced shell scripts:
|
||||
|
||||
`shellcheck --check-sourced {{path/to/script.sh}}`
|
||||
`shellcheck {{[-a|--check-sourced]}} {{path/to/script.sh}}`
|
||||
|
||||
- Display output in the specified [f]ormat (defaults to `tty`):
|
||||
- Display output in the specified format (defaults to `tty`):
|
||||
|
||||
`shellcheck --format {{tty|checkstyle|diff|gcc|json|json1|quiet}} {{path/to/script.sh}}`
|
||||
`shellcheck {{[-f|--format]}} {{tty|checkstyle|diff|gcc|json|json1|quiet}} {{path/to/script.sh}}`
|
||||
|
||||
- Enable one or more [o]ptional checks:
|
||||
|
||||
`shellcheck --enable {{add-default-case,avoid-nullary-conditions,...}} {{path/to/script.sh}}`
|
||||
`shellcheck {{[-o|--enable]}} {{add-default-case,avoid-nullary-conditions,...}} {{path/to/script.sh}}`
|
||||
|
||||
- List all available optional checks that are disabled by default:
|
||||
|
||||
`shellcheck --list-optional`
|
||||
|
||||
- Adjust the level of [S]everity to consider (defaults to `style`):
|
||||
- Adjust the level of severity to consider (defaults to `style`):
|
||||
|
||||
`shellcheck --severity {{error|warning|info|style}} {{path/to/script.sh}}`
|
||||
`shellcheck {{[-S|--severity]}} {{error|warning|info|style}} {{path/to/script.sh}}`
|
||||
|
||||
Reference in New Issue
Block a user