From 6dcf4b8e6457e2ea3e3de09e9e8bd37ca3408a3c Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Mon, 21 Jan 2019 16:54:28 -0800 Subject: [PATCH] Mention extension in changelog and man page --- CHANGELOG.md | 4 ++++ shellcheck.1.md | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7198770..5c6f54c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,10 @@ - SC2245: Warn that Ksh ignores all but the first glob result in `[` - SC2243/SC2244: Suggest using explicit -n for `[ $foo ]` +### Changed +- If a directive or shebang is not specified, a `.bash/.bats/.dash/.ksh` + extension will be used to infer the shell type when present. + ## v0.6.0 - 2018-12-02 ### Added - Command line option --severity/-S for filtering by minimum severity diff --git a/shellcheck.1.md b/shellcheck.1.md index 6600613..01d8122 100644 --- a/shellcheck.1.md +++ b/shellcheck.1.md @@ -64,8 +64,8 @@ not warn at all, as `ksh` supports decimals in arithmetic contexts. **-s**\ *shell*,\ **--shell=***shell* : Specify Bourne shell dialect. Valid values are *sh*, *bash*, *dash* and *ksh*. - The default is to use the file's shebang, or *bash* if the target shell - can't be determined. + The default is to deduce the shell from the file's `shell` directive, + shebang, or `.bash/.bats/.dash/.ksh` extension, in that order. **-V**,\ **--version**