3 ms·
Seconding this. Shellcheck is fucking amazing and whenever I visit the wiki page for a specific issue it's extremely descriptive and helps you understand why th
by __blockcipher__ 8y ago
Seconding this. Shellcheck is fucking amazing and whenever I visit the wiki page for a specific issue it's extremely descriptive and helps you understand why the flagged behavior is a problem.
Some of the tips are obscure stuff that I never would have realized, like using `command -v` instead of `which` in my (arch) linux install script because command -v is more portable.
And then you have the classic stuff like printf instead of echo -e, using pritnf string formatting, writing `\\n` instead of `\n`, double quoting variables etc
- jwilk 8y agoI'm all for "command -v", but do you know which OSes don't have "which" by default?
- JdeBP 8y agoA straw man question. That's not the problem with which. * https://github.com/koalaman/shellcheck/wiki/SC2230 https://github.com/koalaman/shellcheck/wiki/SC2230 * https://unix.stackexchange.com/questions/85249/ https://unix.stackexchange.com/questions/85249/
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]
- deleted 8y ago[deleted]