
Fish shell 2.2 - siteshwar
http://fishshell.com/?version=2.2
======
err4nt
I use Fish shell on Ubuntu and OS X for basic stuff: file manipulation, using
command-line apps, and occassionally doing some light shell scripting to
automate my workflow.

Coming from BASH this shell feels like a much-needed update! Instead of
worrying to make sure my terminal has all of these feature and then having a
different experience in each terminal app - now All of the features are in
shell not the terminal and I can connect anywhere, from any device, and enjoy
the same setup.

The only two downsides are actually the same downside: its not compatible with
BASH's shell scripting, which means you often cant just run shell scripts
written by others, you may have to reformat it a little first. Same if true
for how you format aliases and a few other shell-related stuff you put in your
options file. It will still all work, but unless it's been ported to Fish's
syntax it may need to be updated or rewritten.

This means that all of my scripted automation I have done is Fish-specific for
now and wont run in regular BASH.

~~~
TimWolla
> its not compatible with BASH's shell scripting, which means you often cant
> just run shell scripts written by others, you may have to reformat it a
> little first.

What exactly do you mean by “Shell scripts”? If the script contains a proper
Shebang you can easily run it via `./script.sh`. If not you use: `bash
./script.sh`.

~~~
keedot
I have several bash functions that need to be sourced to be included. For
instance, I use `cdc` to change to my code directory, where I keep my source
for projects I am working on. If I type `cdc name` it changes it to my
projects source directory, save me a lot of keystrokes in a day as I have many
that I flip between. This sourcing of a function is required due to the way cd
is handled, and in it's current form, not directly usable under fish. Maybe
it's easier under fish, but fish isn't backwards compatible to make this work
out of the box.

~~~
gry
Alternatively, you may want to look into z.

    
    
        https://github.com/rupa/z (bash, zsh)
        https://github.com/sjl/z-fish

~~~
StavrosK
I swear by z.

------
StavrosK
I use fish exclusively and swear by it. I switched to zsh some years ago and
enabled fish emulation, but it was slower, and I realized all I was doing was
using fish by proxy, so I switched back to fish.

It's fantastic, I urge everyone to give it a try. Pretty much the only valid
complaint I see here is from people who have bash code that needs to be
sourced to run. I definitely think that it's worth rewriting some code to
switch to a much superior shell, though.

~~~
qznc
Ack.

If I need to source, a quick "bash<enter>" drops me back to bash. This is good
enough for me.

------
jonotime
Fish shell is awesome. But yes, compatibility of sourced functions was a bit
of a problem for me. After about a year with it, I switched back to zsh. With
a couple plugins I was able to get much of the fish features out it, while
keeping the bash compatibility. Here is how I do it.

Install oh-my-zsh, and enable I couple plugins. Here's what I have in my
config: plugins=(git history-substring-search zsh-syntax-highlighting docker
sudo)

In terms of 'enjoying the same setup on all devices', I use dropbox (or
owncloud), to sync my config. All I have to do is add this at the bottom of my
.zshrc file: source ~/Dropbox/global.zshrc

My last tip about directory jumping, for keedot, is there are methods that
will do this for you. I use fasd
([https://github.com/clvv/fasd](https://github.com/clvv/fasd)) which you can
add to your shell and will remember the directories you use often so you dont
have to make special cases for specific ones. Check out the 'z' command. It
has been amazingly useful.

------
Revell
My main gripe with a shell like Fish is that it won't work with the trusted
ol' BASH scripts. Seeing as I deal with quite some BASH scripts on a day-to-
day basis at work this keeps me from trying it out, even though I'd love to be
able to use something more sophisticated/evolved than plain BASH.

~~~
omtose
How come your scripts don't work with #!/bin/bash ?

~~~
markab21
Yeah, I keep seeing this complaint come up. Interesting that so many people
don't realize you can run bash scripts from another shell without fanfare.

~~~
rtpg
There's just a couple tricky ones in these scenarios.

For me, there's virtualenv and rvm that both mess with shell stuff deeply
enough to where running them in fish can be tricky.

virtualenv has good fish support, but never really got rvm working. I ended up
going back to zsh after 2 years or so in fish because of small issues like
that and realising that so long as I had reverse search I wasn't really
gaining much in productivity from fish.

~~~
lnikkila
rbenv has good fish support out of the box if you're willing to switch from
rvm:

[https://github.com/sstephenson/rbenv](https://github.com/sstephenson/rbenv)

------
rf3000
Fish is probably my favorite shell after having worked with csh, bash, and
zsh. But I have to use RVM at work, and it's a real bummer that RVM and Fish
don't play nice with each other. I know rbenv works great with Fish, but I'm
stuck with RVM at work. So using zsh as a second choice for now.

------
hartator
How does it compare to zsh (more specialy the package o-my-zsh)? The only
thing that catch my eyes was the shell command being completed automatically
in grey in the background. That will be great to have this in zsh.

~~~
flyrain
That's right. Auto completion is really cool. I wish zsh and bash have it.

~~~
jonotime
there are several zsh autocomplete type plugins. I like this one
[https://github.com/zsh-users/zsh-history-substring-
search](https://github.com/zsh-users/zsh-history-substring-search)

------
konceptz
I've been using fish shell on osx for the last 3 years. It's fun and puts
ctrl-r in front of my typing without being obtrusive. I'm glad to see it here.

------
threatofrain
I'd like to use Fish more, but my biggest worry is that many tools don't come
with instructions or support for Fish. I think that means you have to be
committed to learning a lot about Fish, or use two shells?

~~~
qznc
I use fish primarily. Once in a while I drop into bash. For example, one tool
requires me to "source environment.sh" (similar to virtualenv) and this cannot
be done in fish.

------
x5n1
i used fish 10 years ago. since then i use zsh. i am happy with zsh. but fish
is a good shell. incredible it's still being developed.

~~~
ufo
Not so sure about the "still". There was a fork and a change of developers
somewhere along those 10 years.

------
vially
I can't seem to find a changelog but I suppose this release should include vi-
mode? Can't wait to try it out.

~~~
tyilo
Here's the release notes:
[http://fishshell.com/release_notes.html](http://fishshell.com/release_notes.html)

------
voidz
Awesome! 90s, here I come!

~~~
voidz
Downvotes? Come on, the 90s were fantastic. I haven't heard of Fish before but
what I said was meant as a supportive pat on the shoulder; projects like these
are great. So whoever's pressing the down button, please, try to crack a
smile, or at least stop ruining mine.

~~~
brudgers
Comments which add little or no value to the discussion are discouraged by HN
community mores [edit: the "avoid me too comments" has been removed from the
guidelines but habits die hard]. The reason is illustrated by this subthread:
such comments often devolve into metadiscussion about behavior and complaints
about community norms.

The up arrow expresses support for the story. The delete link allows a person
to revoke comments that don't merit upvotes. The edit link lets comments to be
modified with supporting details, examples, evidence and rationales that
contribute to HN'ers understanding and knowledge by extending the content.

That's more constructive than complaining about downvotes and implying that
people don't get it.

------
kolev
Awesome! Remove the built-in web server and count me in!

~~~
lcnmrn
The built-in web server is optional anyway.

~~~
kolev
Via configuration, but it's bundled into the code. I'd rather have the web
server as an optional install.

~~~
lemevi
I don't think it automatically starts up. You have to run fish-config to start
it yes?

    
    
        $ fish_config
        Web config started at 'file:///Users/bjorn/.cache/fish/web_config-6VIDFM.html'. Hit enter to stop.
        ::1 - - [12/Jul/2015 11:13:31] code 403, message Forbidden
    

When I kill this and refresh the config in the browser doesn't load anymore.
So I don't see the problem.

~~~
kolev
Not to repeat myself:
[https://news.ycombinator.com/item?id=9877949](https://news.ycombinator.com/item?id=9877949)

