A shell in Rust could be really cool
A shell in Rust could be really cool
Posted Feb 13, 2025 6:01 UTC (Thu) by marcH (subscriber, #57642)In reply to: A shell in Rust could be really cool by dskoll
Parent article: Rewriting essential Linux packages in Rust
Error handling is a real pain in shell (just like in... C) but "set -e" and "trap EXIT" mitigate a bit.
The truth is: the shell ability to "glue" processes, files and pipes is still unmatched. Why? Simply because that's exactly why it was designed for. Everyone who has ever used Python's "subprocess" knows that. Also, "shellcheck" is incredibly good; saved me hours and hours of code reviews thanks to: "please run shellcheck, it will tell you what's wrong with this line". Last but not least: the shell is a decent... functional language! You can put a function in a variable which is amazing and very useful for a language that limited otherwise.
