Fish shell 3.7.0 released, the last release branch before the full Rust rewrite
github.com
github.com
I didn't realize how much this bothered me, but I got unreasonably happy reading that just now, so there was clearly something there.
Little QoL improvements like this are the hallmark of a healthy project.
Fish – Update on the Rust port - https://news.ycombinator.com/item?id=38423908 - Nov 2023 (156 comments)
Fish – A friendly interactive shell - https://news.ycombinator.com/item?id=37272611 - Aug 2023 (162 comments)
Many more at https://news.ycombinator.com/item?id=37275922
Fish really is what it says on the tin: Friendly Interactive Shell. Easily get 90% of the benefits of zsh with just a install and chsh.
I'd say it's pretty good; history gets saved in a human-readable format (YAML) in $XDG_DATA_HOME, which is configurable.
A feature I really like: when retrieving completions from history, Fish shows the commands that occurred for the particular directory you're in.
Searching history is also nice [1].
[1]: https://fishshell.com/docs/current/interactive.html#history-...
> ... tagged with screen session ids
Fish adds a bunch of features that, when you think about it, should have been standard a long time ago… like creating auto-completions from man pages, syntax highlighting on the command line and 24-bit color out of the box. Little things like providing autocompletion of targets if you happen to be in a directory with a Makefile and autocompletion for apt, rpm and yum package managers.
macOS users: Fish can autocomplete brew [0] commands and packages too. Super handy.
As I often see on HN, yes, you can plugin and script your way to adding these features to Bash and Zsh; the beauty of Fish is you get all of this out of the box without having to configure anything. Bash and Zsh plugins require another layer of management and (often) slow things down.
It's one of the first things I install on a new Mac and have made it the default on my FreeBSD machines as well.
Developer Brett Terpstra has a blog post series [1] about going from Bash to Fish; reading this helped me take the plunge. If you're a Bash enthusiast as Brett is/was, make sure to read his first article "Branching out from Bash: Fishing expedition" [2].
[0]: https://docs.brew.sh/Shell-Completion#configuring-completion...
[1]: https://brettterpstra.com/topic/fish/
[2]: https://brettterpstra.com/2019/10/11/branching-out-from-bash...
On a team I limit my fish shell use to my own machine though, and would use bash for scripts to share with a shebang line. I also switch to a bash shell when needed.
It also forgoes compliance with POSIX intentionally, with the rationale that POSIX can sometimes be an obstacle. So you get things that are dramatically better than how they work in other shells, like the prompts. Instead of injecting stuff into envars, you just make a function that echos your prompt out. Same goes for right prompt and most of the other configuration stuff; its all function driven
(Written as a user who is very accustomed to sh and gave up after trying fish briefly)
There are a few minor differences in scripting that I had to figure out when I ran into them (while/if syntax, process substitution, some other minor things), but these were small enough that it didn’t matter.
I’ve had multiple coworkers with a similar experience.
I still write my scripts in bash, though. I feel it’s counterproductive to expect the script user to download fish when bash is already preinstalled nearly everywhere. If someday fish reaches similar penetration I’ll reconsider.
fish is good for a shell but for scripting, probably better to stick to bash for portability. People tend to treat both the same.
On the other hand, most if not all of fish capability can be accomplished via zsh plugins while retaining shell script portability to a decent extent to bash.
…if you don’t mind wasting your time on reinventing the wheel, that is. You get a lot of added benefit, for free, by using Fish. For that cases where you need to follow instructions in bash, just drop into a bash session.
zsh is a much older project and carries with it a lot of baggage in terms of configuration. fish was designed later and straight out of the box.
Intelligent auto complete is extremely useful if you are constrained with your input either by disability or by using a suboptimal device. Switching to fish really helped for ssh-ing to hosts from my iPhone.
Well, assuming you’re a hyper-intelligent being with eidetic memory, that is. The main value of the intelligent completions isn’t conserving keystrokes, but discoverability of input options. It’s the same story for IntelliSense in IDEs.
The main problem with Nu is that it can't really be used as a full-time shell because it doesn't support job control, so a lot of nodejs-based CLIs I need for my job seem to lock up the shell. I got around it by using pueue (a daemon that manages processes), but it's clunky to say the least.
I do think it'll get better as it matures, but I've been through all that pain with Fish and I'm not sure I want to put myself through that again.
[0]: https://github.com/LukeChannings/dotfiles/blob/148a5021da464...
Fish:
- customizing or debugging Fish's completion was utter torture; the defaults are horrible like "carTAB" completes to "blkdiscard" when I don't have cargo in PATH
- nothing in Fish seems to have a useful `--help`, no useful summaries & quick refreshers, just punt the user to a big verbose man page
Nushell:
- no job control, no background jobs
- error handling is utterly broken
- control-C breaks unexpected things, what gets aborted seems up to luck (e.g. aborts the prompt building)
- globs inside quotes, `ls "*"`
- lots of weird parsing errors & bad edge case behavior
Hard to compete with such a mature offering.