Updated SC2209 (markdown)

koalaman
2018-01-19 18:10:19 -08:00
parent c1225589b8
commit f218532cb7

@@ -28,4 +28,9 @@ None.
Quoting a single command (as in `PAGER="cat"` above) doesn't change how the script works. It's purely to show shellcheck (and humans) that a literal assignment of a command name is intentional. Quoting a single command (as in `PAGER="cat"` above) doesn't change how the script works. It's purely to show shellcheck (and humans) that a literal assignment of a command name is intentional.
This warning triggers generally when a variable is assigned an unquoted command name (from a list of hard coded names). See related warning [[SC2037]] which detects the same kind of error through the patterns `var=value -flag` and `var=value *glob*`. This warning triggers generally when a variable is assigned an unquoted command name (from a list of hard coded names). See related warning [[SC2037]] which detects the same kind of error through the patterns `var=value -flag` and `var=value *glob*`.
### Other resources:
* [BashFaq: How can I store the return value and/or output of a command in a variable?](https://mywiki.wooledge.org/BashFAQ/002)
* [StackOverflow: How to set a variable to the output from a command in Bash](https://stackoverflow.com/questions/4651437/how-to-set-a-variable-to-the-output-from-a-command-in-bash)