from Hacker News

Fish – Update on the Rust port

by rhim on 11/26/23, 6:48 PM with 156 comments

  • by cube2222 on 11/26/23, 7:22 PM

    1. It's amazing that they're doing this as a gradual C++ to Rust rewrite, while keeping it working end-to-end, if I understand correctly.

    2. It's amazing how quickly this is going.

    3. If you haven't tried fish yet, make sure to do so! It's a really ergonomic shell and overall very pleasant to use, with good defaults (you don't have to customize it, even though you can, for a great experience). I've switched from bash a couple years ago and haven't looked back since.

    Bonus: you won't have to google how to write a for loop in bash ever again (which I, writing them rarely, and them being unintuitive enough, had to do every single time)!

  • by frankjr on 11/26/23, 7:26 PM

    More on the motivation behind the rewrite.

    https://github.com/fish-shell/fish-shell/pull/9512#issuecomm...

  • by 3PS on 11/26/23, 7:39 PM

    As someone who daily drives fish on ~4 different operating systems and loves it, I've been really excited about this rewrite and blown away by how fast it's been progressing given the size and complexity of the codebase. It will also somewhat lower the barrier to contributing for a lot of people, including myself.

    Another thing I'm very excited about, which has received less attention, is the planned future fish rewrite to use UTF-8 instead of wchar_t (typically UTF-16). UCS2 and UTF-16 have been a plague on software and fortunately Rust makes working with UTF-8 a breeze.

  • by paradox460 on 11/26/23, 7:59 PM

    Fish is such an underrated shell. They make some very strong, opinionated choices (like ditching POSIX compatibility), and the end result is an extremely nice shell. I've been using it for a bit over a decade now, and still love it.

    Fish shell scripting is also extremely pleasant to write, it feels like an ergonomic bash.

    There are a few warts, as with any project, but none of them have ever actually ever blocked me from just getting what I wanted done.

  • by ianschmitz on 11/26/23, 9:16 PM

    As someone who uses zsh + spaceship, what benefits would I gain moving to fish as my main shell? I don’t write many bash scripts so the scripting side is less of a concern.
  • by behnamoh on 11/26/23, 7:06 PM

    one of the fastest shells out there will probably get even faster. ever since I switched from zsh to fish, my terminal productivity has gone up a lot.
  • by acheong08 on 11/27/23, 5:18 AM

    Been using fish for a year. Although I don’t like how they break compatibility with standards so that some scripts don’t work (gvm, nvm, etc), it has all the features I would usually set up manually with zsh. After trying to configure zsh a few different machines, I gave up and went for default fish on all of them.

    It’s already working so well, not sure what there is to gain by porting to Rust. Security? If something can maliciously tamper with fish, it’s probably already on your system or am I missing something?

  • by thowaway91234 on 11/26/23, 8:02 PM

    I love fish. Switch from ZSH+Prezto to just plain Fish and I'm not missing anything and it's way faster. All the servers have bash and I still write bash scripts, but for day-to-day terminal stuff it's Fish all the way for me.
  • by chrysoprace on 11/27/23, 2:14 AM

    I've always been curious about Fish, but was turned off by it not being POSIX-compliant. Is there anybody who can share their experiences with issues and workarounds in this area?
  • by esafak on 11/26/23, 7:39 PM

    Why, was the C++ codebase becoming unmanageable?
  • by ochronus on 11/27/23, 8:56 AM

    Oh! I missed this, what's the original reason for doing the move? Any insight on this?
  • by exxos on 11/26/23, 8:29 PM

    So, what new features do we get from that? Except that it doesn't work on Windows any more?
  • by asylteltine on 11/26/23, 8:13 PM

    I’m glad rust is replacing legacy languages like C and C++. It’s time to stop using memory unsafe language ffs!