6 ms·
Another *-nix shell written in Rust[1] (but neither POSIX nor Bash compatible[2]): Fish [1] https://github.com/fish-shell/fish-shell/releases/tag/4.0.0 https:/
by Pet_Ant 1y ago
Another *-nix shell written in Rust[1] (but neither POSIX nor Bash compatible[2]): Fish
[1] https://github.com/fish-shell/fish-shell/releases/tag/4.0.0 https://github.com/fish-shell/fish-shell/releases/tag/4.0.0
[2] https://fishshell.com/docs/current/design.html https://fishshell.com/docs/current/design.html
- Zambyte 1y agoI didn't realize fish was written in Rust, and it was my primary shell for a few years. Looks like they couldn't resist the rewrite it in Rust meme :-D https://github.com/fish-shell/fish-shell/tree/c2eaef7273c5558678bc0465bdf5bdaef90859cd/src https://github.com/fish-shell/fish-shell/tree/c2eaef7273c555... vs the C++ https://github.com/fish-shell/fish-shell/tree/d9d3557fcfbce1fe603623f536242c20e40b599b/src https://github.com/fish-shell/fish-shell/tree/d9d3557fcfbce1...
- nicce 1y agoThey have pretty good writings about the journey. Sounds like they eliminated ”accidentally” quite many bugs in the process. Initial motivation: https://github.com/fish-shell/fish-shell/pull/9512#issuecomment-1410820102 https://github.com/fish-shell/fish-shell/pull/9512#issuecomm...
- kstrauser 1y agoThat's a very new change. The first Rust beta version just came out in December 2024: https://fishshell.com/blog/fish-4b/ https://fishshell.com/blog/fish-4b/ I switched to the beta on the day it was released and haven't had one single issue with it. That was the smoothest rewrite I've ever seen.
- Zambyte 1y agoGlad it went well! I'd still be using it if it weren't for the fact that Guix didn't play very nicely with it when I switched to that. Might give it another shot at some point though, it was very nice.
- parasense 1y agoThis might seems like a rant for some of you, of even heretical to certain shell zealots... But it's about time we move past Posix compliance for shells. Don't get me wrong, it was a fabulous thing back in the 1980s and 1990s with respect to the Unix wars. But in a twist of irony Linux won the Unix wars, and these days Posix compliance, with respect to shells, mostly holds back innovation or modernization by pegging the concept of a terminal to something from 1988. Namely the Korn Shell (which is reference POSIX SHELL implementation back then), or even worse the Bourne shell. Doing get me wrong, I'm glad we're not on something like the C shell, but I'm pretty sure nobody today actually adhears to pure Posix compliance for shells scripting. So let's all just agree to drop the pretence snobbery, and move forward in a brave new world beyond Posix.
- cflewis 1y agoThings can be both a rant and true at the same time. I'm glad Fish didn't attempt Posix compliance.
- chasil 1y agoSuprisingly, POSIX has recently adopted the find -print0 | xargs -0 idiom, so the gears do turn, but very slowly. The latest standards for POSIX.2 utilities are here: https://pubs.opengroup.org/onlinepubs/9799919799/utilities/ https://pubs.opengroup.org/onlinepubs/9799919799/utilities/ I do agree with you that UNIX userland would be miles ahead of where we are now if the POSIX.2 standard could be cajoled out of the '80s.
- Pet_Ant 1y agoWell the problem is that what should be the lingua-franca in a post POSIX/Bash world? My preference is PowerShell. It's now open source [1], it has a wide install base, and is cross-platform. It is a bit heavy and slower to start (actually takes seconds), but the cleaness of it's record-based nature versus just string parsing is infinitely refreshing. [1] https://github.com/PowerShell/PowerShell https://github.com/PowerShell/PowerShell
- chasil 1y agoIt is unlikely to be PowerShell. On my old i386 server, this is my fastest shell: $ ll /bin/dash -rwxr-xr-x 1 root root 85368 Jan 5 2023 /bin/dash The set of features in the POSIX.2 shell is designed to minimize resource usage. This is simply a place that PowerShell cannot go.