You're skipping the most needed improvement of all: fixing the issue where scripts with unquoted variables will seem to work until they contain a space. Almost every single bash script of more than a dozen lines I've seen outside of large open-source projects fails if a user puts a space in a file path, because the programmer didn't understand the insanity of variable quoting rules! I don't know of any programming language with a more common major footgun.
Shellcheck does cover that. I think the bigger problem is people programming without warnings (in any language).
Now you have me curious - where do you see the need for floats in shell? You are more creative than myself, because I am struggling to come up with a situation where I would lean on this. A "path" type would be by far more useful to my work.
I have a script which uses wmctrl to tile windows when I press a shortcut key (for when I'm using an editor and want the editor window to take up most of the screen).
I guess I could avoid floats using multiplication, but I would rather keep the code as simple as possible.
Sounds like nushell: https://www.jntrnr.com/case-for-nushell/
Re:Was Rust Worth It?
by rustshellscript on Thursday October 26, 2023 @03:10AM
(#38022631)
You can check https://github.com/rust-shell-script/rust_cmd_lib
Check out nushell, the Rust of the shells.
I know it’s still not 1.0. Then just get fish. At least would save some keystrokes.
Fish is an easy alternative. Thanks.
Re:Was Rust Worth It?
by mike_hearn on Thursday October 26, 2023 @10:52AM
(#38026372)
We use a Kotlin scripting variant for our own shell scripting needs at Hydraulic, it's pretty nice because we've joined it with a lot of internal APIs that make working with the filing system and network easy. It fits all those requirements and more (you can declare flags easily at the top level, it has built in progress tracking for slow operations etc).
It's not really a "product" per se but there's an old version for download and some lightweight docs here:
We've never worked out what to do with it. Ideas and feedback welcome. It's pretty nice to use, albeit you need to use IntelliJ to edit scripts if you want IDE features.
Bash with types (especially floats), fewer edge cases, functions with explicit parameters, simple command line flags...