
Fish: A command line shell for the 90s - kick
https://fishshell.com/
======
snide
So somewhat unique experience. I'm a designer. I code. React and css mostly. I
do use Vim which I guess is weird for a designer.

I love Fish. I'm likely not their target audience.

I've been using it for years. Since the early days in 1.x land for sure. The
homepage has never changed and I still laugh at the tagline. I find it's auto-
completion, history and niceties indispensable. I'm the person who asks you
what the command is to rerun the tests. With Fish I never have to ask you
again. I just remember part of it, and suddenly I've got it.

I find its scripting language much simpler to follow than bash. I don't have a
lot of scripts, but the ones I do are easy to manage. The only hiccup I get
into is when I have to look up something on stack exchange, and of course the
example is in Bash. These days though, with Bass and fisherman and so many
other tools, i have options.

Years ago I would explain to other code friendly designers, I'm weird, don't
use this stuff. Go grab zsh. Lately though it's gotten very friendly. Really
the only downside for a light scripter like myself is that need to convert
bash examples to fish problem. Beyond that I feel it's actually a much nicer
shell for new to terminal folks.

Anyways, just an anecdote to add to the pile. Thank you to the devs that have
supported it over the years.

~~~
manaskarekar
> With Fish I never have to ask you again. I just remember part of it, and
> suddenly I've got it.

Are you referring to something other than cycling through history?

In bash, hit `Ctrl+R`, then type whatever part of the command to cycle through
history.

You may choose to adjust the size of the history file in `.bashrc` as needed.

A good reference: [https://www.digitalocean.com/community/tutorials/how-to-
use-...](https://www.digitalocean.com/community/tutorials/how-to-use-bash-
history-commands-and-expansions-on-a-linux-vps)

~~~
AnthonBerg
The Fish interface for this is much more convenient and elegant and ergonomic.

~~~
dickeytk
yeah agreed. If you have trouble understanding how it could be better just
install fish and try it for 5 minutes and you'll see what we mean. There are
attempts to emulate some of it in zsh, but it's still not as good as what fish
comes with out of the box.

[1] [https://github.com/zsh-users/zsh-autosuggestions](https://github.com/zsh-
users/zsh-autosuggestions)

[2] [https://github.com/zsh-users/zsh-history-substring-
search](https://github.com/zsh-users/zsh-history-substring-search)

~~~
enriquto
oh my god, i tried it and my terminal turned into a christmas tree! How can
people actually work with such kitsch colors?

~~~
AnthonBerg
Because we are able to extract useful information from colorized output, being
as it is an extra dimension of information output; I for one don't get an urge
to pass a sort of of societal judgement of the high/low artistic worth of the
use of color which may further increase efficiency. ¯\\_(ツ)_/¯

~~~
enriquto
Color is indeed very useful for terminals. But it seems to me that fish takes
the use of color to an exaggerated, very unpleasant, extreme. It feels
overwhelming to my senses. Like having blinking text here and there. It fills
the whole screen with a mix of normal and reverse text in several colors, just
for simple stuff like completing an argument.

~~~
bobbylarrybobby
You can customize the colors with fish_config

~~~
enriquto
i've seen it, and it is indeed easy to tone the coloring down. The fish shell
completion is amazing, I love it! Too bad the shell does not seem to support
process substitution (at least not with the same syntax as bash or zsh), so I
cannot use it for the moment.

------
CJefferson
I want to love fish, but I get annoyed by the lack of true subshells. I love
being able to write things like:

(cd dir; make) &

To start some stuff in the background, but with fish directory and variable
changes in () don't stay inside the ().

~~~
cormacrelf
This comes up every time Fish makes it to HN. It still bugs me too. So does
up-arrow skipping the first matching history item and having to use right-
arrow for the ghost entry that shows up. These two are 100% enough for me to
change shells, and I will. Fingers crossed NuShell does well!

~~~
losvedir
What's the problem with right arrow? I use ctrl+e (a la emacs) to accept the
ghost completion.

~~~
istjohn
Not OP, but I find myself attempting to tab-complete Fish commands all the
time. It's just how I've been conditioned by every other auto-completion
interface I've ever used.

------
chrysoprace
Fish is great, and it brought about some great defaults such as autocompletion
and autosuggestion. The only drawback is the incompatibility with bash.

The wonderful community made plugins that add these features to zsh (which IS
compatible with bash), and it it's really great. My understanding is that
there are still a couple fish features not implemented for zsh yet, but if you
care about such things as bash compatibility then I'd suggest you give it a
try instead.

~~~
yoloClin
> My understanding is that there are still a couple fish features not
> implemented for zsh yet

I'd love to know which ones! I was a bash user for 10 years, ZSH defaults put
me off and it wasn't till I ran oh-my-zsh that I really learnt what I was
missing, the following make me feel like a 10x-er ;) :

\- zsh-autosuggetions \- zsh-syntax-highlighting \- colored-man-pages

Edit: And the `zstyle ':completion:*' menu select` autocomplete

~~~
chrysoprace
I've not used fish extensively so I couldn't tell you. My statement is mostly
based on impressions from other people who have also tried both. I should give
fish another go and see how I like it, but the bash incompatibility is a deal-
breaker for it to become my daily driver.

------
aiyodev
If you install fish, you should also install ohmyfish so you can install a
good theme. I like bobthefish:

[https://github.com/oh-my-fish/oh-my-
fish/blob/master/docs/Th...](https://github.com/oh-my-fish/oh-my-
fish/blob/master/docs/Themes.md#bobthefish)

~~~
e12e
To each their own - I'm so glad fish doesn't come with something like this out
of the box! :)

------
ylere
I've been using fish as my default shell for a long time and recently started
using it with [https://starship.rs/](https://starship.rs/), which adds some
niceties to the prompt without having to go overboard with customizing and
configuring your shell.

------
einpoklum
Can someone give a few prominent examples of fundamental differences from
bash? I don't mean trivial things like having `config.fish` instead of
`.bashrc`, or not using fi and esac to conclude if and case statements.

I noticed fish has:

* extensive syntax highlighting

* "global" variables shared by all instances of fish, persisting past reboots.

what are other important features?

~~~
e12e
Many great responses here.

I've considered switching from bash to fish (something I never did with zsh).
The main reason I didn't is Stockholm syndrome, or that I'm too used to bash
by now.

I _think_ you can get zsh to do most of what fish does out of the box. If bash
is Ed, it feels zsh is emacs and fish is (neo)vim.

Zsh is huge and I always get a bit of a panic attack when someone has given me
a ssh login with zsh as the default shell. And an irrational urge to maul a
unicorn.

With fish, it feels more like a friend went and tidied up your apartment just
to be nice.

I guess I'm so used to bash, that the limited support that comes from
completions is enough - and I end up writing a bit of documentation and
automation, and work on "foreign" (other people's) servers - and it helps me
to work in a posix shell for that reason - with fewer surprises.

You might even find that fish does out of the box something bash (now) can too
- just isn't enabled by default or in typical distribution's configs.

Ymmv - it's worth testing imnho. And more interesting than zsh, which just
feels like someone was bored in it class in high school and added colors and
tinkered with the prompt, and tried à million different ideas - but never
really _liked_ working in shell.

~~~
yjftsjthsd-h
>If bash is Ed, it feels zsh is emacs and fish is (neo)vim.

I would have thought fish=emacs and zsh=vim in this analogy, since fish isn't
really compatible with bash but zsh is?

~~~
e12e
I was more thinking of how many(?) people will readily use a only slightly
customized vim - and be reasonable productive in a standard config, vs emacs
where the stronger trend seems to be building an ide on top of emacs - to the
point were to users can't readily use each other's setup efficiently - or
indeed use the standard distribution without customization.

~~~
yjftsjthsd-h
Ah, okay; that does make sense. FWIW:

    
    
        $ wc -l ./.profile ./.vim/vimrc
        249 ./.profile
        173 ./.vim/vimrc
        422 total
    

...but I probably just forgot that I'm an outlier:)

------
llarsson
I love the way it predicts what I will write, how attractively it presents the
predictions, and how it understands commands and completions based on man
pages.

But with decades of bash experience, I struggle with making even the slightest
scripting in fish's own language for whenever I want to make a smart little
addition to my environment.

------
phonebucket
Love this shell. Sensible defaults make it so quick to get up and running too.

------
resonious
This might make me a bit of a freak, but the one thing keeping me from trying
out Fish for real is decent vim bindings. I know Fish has vim bindings, but I
found the feature support pretty lackluster and the behavior of some keys like
'e' to be inaccurate.

I know some folks say that vim-style editing is overkill for a shell where
you're often just submitting one-liners, but it saves so much time for me to
be able to just jump right into the middle of a previous command and change
one word without holding down arrow keys to get there.

Granted, it's been awhile since I looked into Fish's vim mode, so maybe it's
improved. Last time I checked, it sounded like it just wasn't a priority,
since Fish's selling point is the intelligent autocomplete and such.

~~~
raimue
If you are working on a complex, long command pipeline, in bash you can use
Ctrl-x Ctrl-e to open your $EDITOR to edit the line as needed. The commands
will be executed as soon as you save the file and exit.

~~~
achikin
Alt(Option)-e in fish does the same.

~~~
Rebelgecko
AFAICT this doesn't work if $EDITOR includes any arguments

------
atemerev
Yes, the only shell I actually enjoy writing scripts with. Bash is old and ad-
hoc, and zsh is basically bash on steroids. Fish is something where actual
language designers have sit and thought thoroughly how the shell language
should work and look like.

------
airesQ
I feel like there is a big audience for fish with bash support.

This could be a nice project; lets call it "shark".

------
VLM
Something not discussed enough is the competing concepts of shell as hyper
customizable UI where fish wins, and shell as a light programming language for
short casual scripting, where I kinda have to use standard uncustomized bog
standard identical everywhere bash.

------
tmysl
As nice as fish is, it's not fully posix compliant, leads to some weird bugs
here and there

~~~
pmarin
For interactive shells do not matter if is not POSIX compliant. I use csh (the
really old one) as interactive shell.

~~~
kbumsik
It matters a lot when dealing with default environment variables. Even when
expanding $PATH fish will give you much headache.

------
YuukiRey
I use it as my daily driver and I've also started writing some smallish
scripts in it. It's actually fun whereas bash always seemed rather tedious. I
love how easy it is to parse arguments with `argparse` and to add completions
through `complete`.

Also fish utils like `string join` etc. are super helpful when writing small
scripts.

Shameless plug: [https://github.com/cideM/fish-
yvm](https://github.com/cideM/fish-yvm) yarn version manager written in fish

------
nmstoker
Purely superficial comment:

Thought they were being ironic with the 90s / Netscape / glorious VGA comments
but maybe these really haven't been updated in an age. They've got screenshots
not updated since 2006 (based on the release date in GitHub for release 1.21,
given version 1.21 is show in one of the screenshots! You can also tell
they're older from the chrome on the Mac terminal title bars)

~~~
WalterGR
Fish was first released in 2005. They're being cheeky.

It looks like the project didn't start calling itself a shell for the 90s
until 2013. At least on the project's home page. Compare

* [https://web.archive.org/web/20130420050628/http://fishshell....](https://web.archive.org/web/20130420050628/http://fishshell.com:80/)

* [https://web.archive.org/web/20130521005841/http://fishshell....](https://web.archive.org/web/20130521005841/http://fishshell.com:80/)

------
blondin
love fish. but love compatibility with bash most.

