News for hackers. Stuff that matters.
Re:Fish 4.0: The Fish of Theseus by wellthisisgreat on Saturday December 28, 2024 @08:19PM (#42536513)
Is fish better than Zsh?
Re:Fish 4.0: The Fish of Theseus by SMP-UX on Saturday December 28, 2024 @11:37PM (#42537559)
It's 'easier' for some people but you lose GNU bash compatibility and it kinda underlines all of the issues with interactive only shell systems -- a lack of interoperability.

It's honestly a non-issue in the current year to learn zsh or tcsh

Re:Fish 4.0: The Fish of Theseus by ComputerGuru on Sunday December 29, 2024 @12:32PM (#42541355)
On the other hand, fish being a clean-room shell implementation not beholden to the baggage of legacy systems is immune to some crazy behaviors or vulnerabilities that other shells - including zsh - are prone to: https://yossarian.net/til/post/some-surprising-code-executio...

Compatibility has also come a long way in recent releases; you should give it a try.

Re:Fish 4.0: The Fish of Theseus by arp242 on Sunday December 29, 2024 @02:46PM (#42542423)
They don't work in zsh; they're bash issues.
Re:Fish 4.0: The Fish of Theseus by faho on Sunday December 29, 2024 @02:54PM (#42542488)
No, they work in zsh, with one extremely small change: The referenced variable needs to exist.

Try this (tested with zsh 5.9 on archlinux):

    foo='PWD[$(echo hahaha >&2)0]+42'
    [[ "$foo" -eq 5 ]]
In bash, this would also print "hahaha" with "a" (or any other possible variable name) instead of "PWD", that's why many think it doesn't work at all in zsh.

I'm pretty sure zsh has an optimization where it skips the indexing if the variable doesn't exist, which happens to sometimes stop this. But since you can just reference variables like PWD, that you know exist, it's not really a security improvement.

Re:Fish 4.0: The Fish of Theseus by SMP-UX on Sunday December 29, 2024 @06:21PM (#42544490)
I don't have a system capable of building rust applications so no thank you
Re:Fish 4.0: The Fish of Theseus by assbuttbuttass on Saturday December 28, 2024 @09:36PM (#42536935)
It's definitely better out of the box, with no configuration. If you add a bunch of fancy plugins to zsh then they can be very similar
Re:Fish 4.0: The Fish of Theseus by arp242 on Sunday December 29, 2024 @02:42PM (#42542391)
Depends what you want; in general:

Fish offers one behaviour out of the box with very little configurability, and that it's. If you like that behaviour then Fish is great. If you don't, then well, it's not so much.

zsh on the other hand is very flexible and can be shaped in to more or less anything you like. Some people really like that sort of flexibility and configurability, others don't.

Re:Fish 4.0: The Fish of Theseus by lucasoshiro on Sunday December 29, 2024 @03:47PM (#42542925)
It depends on what you consider "better". ZSH out of the box is not much more than Bash, while Fish has really nice features without any configuration. But I think that the ZSH community is more mature and ZSH is compatible with Bash syntax (while Fish has its own syntax).

Just install it and see if it's for you.