Live data from Hacker News

Fish 4.0: The Fish of Theseus

fishshell.com

141–150 of 204 posts

Re: Fish 4.0: The Fish of Theseus

#141
post #62

Is fish better than Zsh?

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

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

#142

Earlier quoted context omitted.

I know rust-fish is being used on at least some non-x86_64 non-aarch64 routers because we've accepted patches by those users to make it build on platforms without native 64-bit CAS.

That would be any pre-ARMv8.1 machine?

In this case, it was specifically openwrt on mipsel.

Re: Fish 4.0: The Fish of Theseus

#143
post #11

I remember switching from bash to zsh a few years back and thinking I was the bees knees. After the switch trying other shells seemed like bike-shedding because, I mean, what more could a shell? Then I got a new computer and decided to start from scratch with my tooling and downloaded fish. I was shocked how it instantly made zsh feel cumbersome and ancient . Heartily recommend others give it a try as a daily driver…

Also, do consider xonsh.[1]

It's a Bash-like shell written in Python. It has significant overlap with the awesomeness of fish, and has the advantage of being able to write your shell scripts in a Python dialect. So if you know Python, the mental burden is much lower.

On top of that, it's cross platform, since Python is. No WSL needed.

I switched to it in 2018 and haven't looked back. Originally it was just because I wanted a better command prompt environment in Windows for work, but I liked it so much I switched to it in Linux as well.

(And yes, you can type any Python statement right in the command prompt).

[1] https://xon.sh/

Re: Fish 4.0: The Fish of Theseus

#144
post #112

Earlier quoted context omitted.

Absolutely. Staying within an order of magnitude for a project of this size is just really good eyeballing. :)

It's actually not fair to judge this one way or the other at the two year mark. We technically removed the last C++ code from the core project in January 2024 (~a year ago), the last C++ code altogether (a test helper) in June 2024 (six months ago). We only decided to push out a release now because we've added enough new features (not counting the rewrite as a feature) to warrant a release. But at the same time, some…

The UTF-32 thing was confusing me. It is mentioned in multiple places but never explicit if it was a temporary design decision to ease the transition, perfectly reasonable, or the design going forward in perpetuity, in which case I would love to understand why something like bstr (WTF-8 under the covers) doesn't fit the bill. I've gathered so far that it might be the former, but if it is the later I would still like to know more.

Re: Fish 4.0: The Fish of Theseus

#145
post #42

Earlier quoted context omitted.

Interesting, I went the other way about 7 years ago - switched from fish to zsh (initially with oh-my-zsh). The interactive experience was similar enough on both shells, and the performance was great on fish and okay-ish on zsh, but two things won me over: 1. With zsh, I can copy-paste some bash snippet and in 99% of cases it will just work. Aside of copy-pasting from StackExchange, I also know a lot of bash syntax b…

I “devolved” mostly along the same path. Bespoke shell to OMZSH to Zsh to Bash. Zsh has a few nasty Bashism footgun incompatibilities. If I remember correctly the worst one is with how globbing / “*” works, which is why that is guarded with an option. My main reason for sticking with Bash is that it’s everywhere, and the places where it isn’t try very hard to support the most-used featureset of Bash. A stock Bash she…

Bash on osx is pretty old due to avoiding GPLv3. I think they have zsh as the default login shell

Re: Fish 4.0: The Fish of Theseus

#146

Earlier quoted context omitted.

Just fyi, you should use `#!/usr/bin/env bash` instead of `#!/bin/bash` or whatever because you can't assume the location of bash (but the location of `env` is indeed portably fixed). e.g. FreeBSD (and macOS?) has bash at `/usr/local/bin/bash`

That assumes you care about portability. Not everybody does. Writing portable software is difficult, and doing it for shell scripts even more so. Blindly pursuing portability for its own sake is not worth it. Weigh the cost of portability against the odds that the software will ever run on different systems. For me personally it is never worth it to write my personal programs portably. This would require that I test…

It’s not so much a portability thing IMO as it is a utility thing. If I have a newer bash in my PATH than what is in /bin/bash, I want to use it.

Re: Fish 4.0: The Fish of Theseus

#147

Earlier quoted context omitted.

It's actually not fair to judge this one way or the other at the two year mark. We technically removed the last C++ code from the core project in January 2024 (~a year ago), the last C++ code altogether (a test helper) in June 2024 (six months ago). We only decided to push out a release now because we've added enough new features (not counting the rewrite as a feature) to warrant a release. But at the same time, some…

The UTF-32 thing was confusing me. It is mentioned in multiple places but never explicit if it was a temporary design decision to ease the transition, perfectly reasonable, or the design going forward in perpetuity, in which case I would love to understand why something like bstr (WTF-8 under the covers) doesn't fit the bill. I've gathered so far that it might be the former, but if it is the later I would still like…

Fish has always used utf-32 codepoints stored in wchar_t, from the first git commit in 2005.

Unfortunately it's pervasive throughout the entire codebase (which does a lot of string shuffling).

So it's a historical mistake, but not something to be fixed in the same step as switching the implementation language.

bstr was mentioned as a direction and is a possibility.

Re: Fish 4.0: The Fish of Theseus

#148

Earlier quoted context omitted.

Just fyi, you should use `#!/usr/bin/env bash` instead of `#!/bin/bash` or whatever because you can't assume the location of bash (but the location of `env` is indeed portably fixed). e.g. FreeBSD (and macOS?) has bash at `/usr/local/bin/bash`

bash is /bin/bash on macOS, unless the user really likes bash, in which case it's probably /opt/homebrew/bin/bash or /opt/local/bin/bash

In any of those cases, using `/usr/bin/env bash` gets what the user probably wants

Re: Fish 4.0: The Fish of Theseus

#149
post #32
post #11

I remember switching from bash to zsh a few years back and thinking I was the bees knees. After the switch trying other shells seemed like bike-shedding because, I mean, what more could a shell? Then I got a new computer and decided to start from scratch with my tooling and downloaded fish. I was shocked how it instantly made zsh feel cumbersome and ancient . Heartily recommend others give it a try as a daily driver…

I went bash -> fish -> zsh. The main reason I switched is because zsh can (often) source bash scripts and can use bash completion scripts (usually), and I was tired of having to translate things from bash to fish. I also ran into a few things where something that was relatively easy to do in bash was impossible to do with fish. But that was years ago so maybe that is less of an issue now, and I don't remember exactly…

I used bash for ages, and never really saw what zsh offered in comparison: I would have had to customize it almost as much as bash, and it didn’t really give me anything new.

Fish was so much better than either out of the box, and I still have done virtually no configuration other than setting it up to use my common starship prompt, which is supported in bash as well.

I don’t understand personally the argument about not having bash syntax. If I want it, I just run `bash`.

Re: Fish 4.0: The Fish of Theseus

#150
post #11

I remember switching from bash to zsh a few years back and thinking I was the bees knees. After the switch trying other shells seemed like bike-shedding because, I mean, what more could a shell? Then I got a new computer and decided to start from scratch with my tooling and downloaded fish. I was shocked how it instantly made zsh feel cumbersome and ancient . Heartily recommend others give it a try as a daily driver…

My only issue with Fish is when pasting things from the web that assume Bash, a lot of the time it just works, then now and then I get screwed. I don't know nearly enough Fish or Bash to switch. Still though, I prefer Fish ultimately.

It’s interesting how many folks in the comments have essentially this complaint, of not being able to paste bash from the internet. I just run `bash`, paste the thing, and then exit bash.
Post reply on HN