jlevy/the-art-of-command-line

Consider adding shellcheck-repl

HenrikBengtsson opened this issue · 0 comments

(Disclaimer: I'm one of the authors)

This tool adds ShellCheck protection on top of your Bash read-eval-print loop (REPL). For example, typing the following at the prompt and hitting ENTER:

$ for w in "$words"; do echo "$w"; done

prevents it from being evaluated with the following message:

$ for w in "$words"; do echo "$w"; done
           ^-- SC2066: Since you double quoted this, it will
	       not word split, and the loop will only run once.

This gives you a chance to fix the mistake before re-submitting.