News for hackers. Stuff that matters.
Re:Fish shell 3.0 by chrisweekly on Friday December 28, 2018 @04:03PM (#18779397)
Can anyone who's experienced with both fish and zsh comment on reasons fish might be better?
Re:Fish shell 3.0 by okdana on Friday December 28, 2018 @07:39PM (#18780765)
fish 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.

Re:Fish shell 3.0 by zanchey on Friday December 28, 2018 @09:01PM (#18781241)
Job control should be fully featured - backgrounding, stopping/continuing, and disowning are all implemented. If there's something missing we'd definitely look at adding it.
Re:Fish shell 3.0 by okdana on Friday December 28, 2018 @09:20PM (#18781330)
Yeah, you're right of course. I think i was conflating job control with sub-shells, sorry.
Re:Fish shell 3.0 by ilaksh on Friday December 28, 2018 @05:21PM (#18779947)
For 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.

Re:Fish shell 3.0 by h1d on Friday December 28, 2018 @05:57PM (#18780164)
Shell 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

(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.)

Re:Fish shell 3.0 by posedge on Sunday December 30, 2018 @02:00PM (#18790690)
This 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.