4 ms·
This is why I've ultimately come to the conclusion that shells are for casual use only, not for any kind of serious work. There are too many implementation deta
by ironmagma 6y ago
This is why I've ultimately come to the conclusion that shells are for casual use only, not for any kind of serious work. There are too many implementation details, inconsistencies, and footguns to write anything that needs to be somewhat reliable.
- rbanffy 6y agoWhat do you use instead?
- ironmagma 6y agoTo be fair, there is one shell that I think someday we could rely on. https://www.nushell.sh/ https://www.nushell.sh/ Besides that, my answer is "any programming language," since at the core, dealing properly with system calls and their outputs is the whole reason PL's exist. In practice, I've been using Rust lately which makes a nice systems language, but JS and Python are always options for shell-like scripts that don't suffer from quite the level of degeneracy when encountering weird filenames or unexpected input in general.
- rbanffy 6y ago> my answer is "any programming language," That would be a terrible shell. Changing directories, listing them, moving files, running programs are all simple no-brainer operations in any reasonable shell, but are non-trivial in any programming language that's not designed to be a shell.
- ironmagma 6y agoSo you use the shell for things that require no brain: browsing your directory tree, casual printing of files. Then, when you need to encode these operations in a script, you pull out a scripting language, because you need more than the shell can provide with its casual nature.