3 ms·
Can anyone who's experienced with both fish and zsh comment on reasons fish might be better?
by chrisweekly 8y ago
Can anyone who's experienced with both fish and zsh comment on reasons fish might be better?
- ilaksh 8y agoFor me it's the out-of-the-box autocompletions just work really well. Not sure I had the ultimate zsh completions setup before but I did try and was not able to get anything near as good as fish. It's like fish can read your mind.
- h1d 8y agoShell scripting finally feels sane. Just the normal "if" and other basic conditionals make you feel you want to switch. Some scripting example : https://nicolas-van.github.io/programming-with-fish-shell https://nicolas-van.github.io/programming-with-fish-shell (I use zsh as shell, as enough customization can do much of what fish can achieve with bit more stability but maybe they fixed with 3.0 which I haven't tried yet.)
- posedge 8y agoThis is nice and everything, but I don't see why you would write fish scripts in the first place. For anything like that I'd use python, and imo the only reason to do POSIX shell scripting is that a compliant shell is probably preinstalled on your target platform.
- okdana 8y agofish doesn't try to support all of the weird historical quirks of Bourne-style shells, so its grammar and built-in 'API' are far simpler and clearer. Its out-of-the-box configuration is much much nicer for most people than zsh's. Completion definitions are easier to read/write. Its source code seems less byzantine. And its GitHub-based development model is more accessible. The down side is that it's functionally very limited compared to zsh. fish's completion functions are easy to maintain, but the trade-off is that they don't offer the fine-grained contextual control over behaviour that zsh's do. Features like globbing, sub-shells, job control, co-processes, modules, &c., are absent or extremely limited. There are fewer knobs and switches, though as mentioned it tries to do the right thing for most people by default. And a consequence of the syntax being clearer is that it's also much more verbose, which i guess you may or may not appreciate. Over-all i think fish is a good shell for the (very common) type of person who doesn't really care about shells but was drawn to zsh just because it has nicer completion than bash and lets you write fancy prompts. I don't think it's a good fit, yet, for people who write complex scripts or regularly make use of stuff like extended globs, background jobs, and fancy parameter expansions.