Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Fish 3.4.0 Released (github.com/fish-shell)
131 points by robin_reala on March 13, 2022 | hide | past | favorite | 21 comments


I started using fish several years ago on the recommendation of a friend and never looked back. It's the must-install shell of every machine I own.

Fish occasionally has the rare syntax quirk I need to drop into bash for, but the autocomplete is so next level I simply can't use a plain shell anymore.


Looks like the major syntax quirk just went away:

> fish’s command substitution syntax has been extended: $(cmd) now has the same meaning as (cmd)

I never really understood the appeal of maintaining perfect bash compatibility in your prompt. The only time I've ever needed that was because I'm copy/pasting something from the internet, which I probably shouldn't be doing at all, and at the very least not with such frequency that it effects my decision of which shell to use.


> The only time I've ever needed that was because I'm copy/pasting something from the internet, which I probably shouldn't be doing at all, and at the very least not with such frequency that it effects my decision of which shell to use.

It is nice when you generally write {POSIX,Bash} scripts, and decide to quickly throw something together in the interactive shell. I find myself often putting $(), before realising that I need to remove the $ to make it valid in fish. But yeah, i think it's mostly to make shell scripts of the internet work OOTB.


I really like the fish syntax and feature set on paper.

My biggest problem with fish is that my muscle memory is still Bash/POSIX, and training it out of me wasn't working.

ZSH autocomplete plus autosuggestions plus syntax highlighting got me close enough, and the muscle memory is backwards compatible when I touch somebody else's machine or server.


I’m interested to learn more about why you never looked back (or probably didn’t use anything else) once you tried Fish shell; like what it offered that was so compelling and what you saw lacking in other shells (I’m fine with the fact that this may probably be specific to your needs).


The auto-complete is just that good. It will autocomplete options for arbitrary programs intelligently. For example I use sshfs on a few different machines in my home and can simply type the name of the program and press the up arrow to get the list of every previous sshfs command string I've entered. It uses a history file like bash but can pick out only the things pertaining to the program I'm trying to run.


probably the biggest thing for me is that command substitution translates output into arguments by line so that things like

    rm (cat list-of-files)
just work without any quoting nightmare regardless of what kind of weird characters are in filenames (well, at least as long as they don't contain newlines). that just simplifies working on the commandline a lot.

search feels more convenient although the difference seems superficial and i can still see room for improvement (i'd like to be able to type two words and then search for commands with those two words in any position)

the syntax and other things like array handling feel a lot cleaner.

multi line commandline editing felt like a great idea too although the use was not very intuitive (i think they removed that feature?)


3.4.0 adds support for $(foo) interpolation, which was the one thing that usually tripped me up when using basic provided scripts e.g. installation instructions in READMEs. Fish previously only supported the (foo) syntax, without the dollar.


The old behavior amused me. There's probably a decent argument for it, but it's kind of infuriating:

theonemind@onemindsmachine ~> echo $(badfish) fish: $(...) is not supported. In fish, please use '(badfish)'.

echo $(badfish) ^

"I know exactly what you meant. Not gonna do it."


`echo (goodfish)` just looks a lot cleaner to me. and as i am still using other shells some times (can't install fish on all my clients machines) the visual difference between `()` and `$()` helps to make it more obvious which shell i am currently using.


Seems like just printing a warning to stderr or something would be a reasonable behavior (or even just printing to the screen when interactive in some special way that doesn't go to stdout or stderr in order to not mess up scripts)


When they added support for && it really made my life easier with pasting snippets, happy to see this now as well


Also support for the 'export FOO=42' syntax helped a lot, with some care very simple scripts can be made to work both on fish and traditional shells


Nice!

I recently gave up on Fish after 3 years of using it as my primary shell. It was nice, but not nice enough to make up for all the pains of being different from POSIX shells. Glad to see Fish improving on that in a small but concrete way.


Any fish users know what the state of vim emulation is like? I know it has some support, and zsh’s is by no means great, but it was better enough last time I checked (at least a few years ago) to prevent me from switching. I really mostly want to be able to drop into normal mode and navigate by word


Vim for single lines is a strange subset of vim interaction, but it's well documented[1] and works well enough in modern fish.

[1] https://fishshell.com/docs/current/interactive.html#vi-mode-...


Besides eshell, are there any shells that have mouse support in the line editor? Somebody once lead me to believe that fish does, but I could never find more information about this or get it to work.


Heh, I got curious: https://github.com/fish-shell/fish-shell/issues/4918#issueco...

Prob'ly easiest to open the command in an editor. (C-x C-e in bash; A-v for fish) and use mouse support there.


This works in Kitty/fish for me, at least to position the cursor, but not Kitty/bash, so I'm assuming it's not a Kitty thing.



This is the number one quirk I hated having to work around. This is a good change.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: