This is a great post. It posits an idea “Let’s treat Bash development as software engineering, with all the discipline of any other programming language”. It presents the meat of this idea, and that’s all.
I knew about (and regularly use) shellcheck.net. It is a wonderful tool to learn about bash and fix potential bugs.
Oilshell integrating (at least some form of) shellcheck’s linting capability and shfmt (automatic formatter) would be great UX wins.
Skip down to where I say Oil was “negatively inspired” by ShellCheck. In summary, I’ve used ShellCheck, but I don’t like how many false positives it gives. Oil’s approach is to instead design a language where the obvious thing is not wrong, and where a nicely written program doesn’t produce lint errors on every other line.
Also, Oil should be more statically analyzable, so diagnostics should be more accurate. For example, statically resolvable imports would make a lot of errors more accurate.
Although keep in mind this is the goal, not something I’ve done yet. I still need to meet feature/performance parity with bash clone before really tackling the Oil language. As for shfmt, I definitely want to have an Oil language formatter, but that’s also future work.
“But we want your cake now!!” :) Seriously though. I really appreciate your work with OilShell. I hope your experiment is very successful, and once it stabilizes a bit more I hope to use it as a replacement for Bash. I’m excited about your work in fixing up our vegetables, so we can have nicer cake.
And I’ve probably run that analogy into the ground now, so I’ll shut up :)
This is a great post. It posits an idea “Let’s treat Bash development as software engineering, with all the discipline of any other programming language”. It presents the meat of this idea, and that’s all.
Definitely. I hope the Oilshell guy sees this and thinks about this as part of his improvements to shell.
I knew about (and regularly use) shellcheck.net. It is a wonderful tool to learn about bash and fix potential bugs. Oilshell integrating (at least some form of) shellcheck’s linting capability and shfmt (automatic formatter) would be great UX wins.
FWIW I wrote a little bit about ShellCheck in this comment: https://www.reddit.com/r/oilshell/comments/7fjl5t/any_idea_on_the_completeness_of_shellchecks_parser/
Skip down to where I say Oil was “negatively inspired” by ShellCheck. In summary, I’ve used ShellCheck, but I don’t like how many false positives it gives. Oil’s approach is to instead design a language where the obvious thing is not wrong, and where a nicely written program doesn’t produce lint errors on every other line.
Also, Oil should be more statically analyzable, so diagnostics should be more accurate. For example, statically resolvable imports would make a lot of errors more accurate.
Although keep in mind this is the goal, not something I’ve done yet. I still need to meet feature/performance parity with bash clone before really tackling the Oil language. As for shfmt, I definitely want to have an Oil language formatter, but that’s also future work.
“But we want your cake now!!” :) Seriously though. I really appreciate your work with OilShell. I hope your experiment is very successful, and once it stabilizes a bit more I hope to use it as a replacement for Bash. I’m excited about your work in fixing up our vegetables, so we can have nicer cake. And I’ve probably run that analogy into the ground now, so I’ll shut up :)