Consider adding shellcheck-repl
HenrikBengtsson opened this issue · 0 comments
HenrikBengtsson commented
(Disclaimer: I'm one of the authors)
- shellcheck-repl
- Title: Validation of Shell Commands Before Evaluation
- URL: https://github.com/HenrikBengtsson/shellcheck-repl
- Requirements: ShellCheck and Bash (>= 4.4)
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.