Hacker News new | ask | show | jobs
by HenrikB 1322 days ago
> "15. Use shellcheck. Heed its warnings."

(Disclaimer: I'm one of the authors)

After falling in love with ShellCheck several years ago, with the help of another person, I made the ShellCheck REPL tool for Bash:

  https://github.com/HenrikBengtsson/shellcheck-repl  

It runs ShellCheck on the commands you type at the Bash prompt as soon as you hit ENTER.

I found it to be an excellent way of learning about pit falls and best practices in Bash as you type, because it gives you instant feedback on possible mistakes. It won't execute the command until the ShellCheck issues are fixed, e.g. missing quotes, use of undefined variables, or incorrect array syntax.

It's designed to be flexible, e.g. you can configure ShellCheck rules to be ignored, and you can force executtion by adding two spaces at the end.

License: ISC (similar to MIT). Please help improve it by giving feedback, bug reports, feature requests, PRs, etc.