16 ms·
Not near a terminal right now but it would be fun to run my shell history through this to see if I learn anything. Anyone try it?
by parhamn 6y ago
Not near a terminal right now but it would be fun to run my shell history through this to see if I learn anything. Anyone try it?
- jkingsman 6y agoUnless you're composing very rich commands, likely not much will show up. It exceeds at finding things like interpolation gotchas, bad loop control, etc. Much more structural than just one off commands (though would likely bug about a bunch of useless `cat`s when you can use redirect operators instead (i.e. `cat foo.txt | grep` is an antipattern according to shellcheck)
- HenrikB 6y agoshellcheck-repl: Validation of Shell Commands Before Evaluation https://github.com/HenrikBengtsson/shellcheck-repl https://github.com/HenrikBengtsson/shellcheck-repl This tool validates your commands at the Bash prompt using ShellCheck and refuses to evaluate them if there's a mistake. It ignores a set of rules that doesn't play well with oneliners. (Disclaimer: I'm one of the authors)