Fish Shell
I’ve been using Linux since 2007 and since then I’ve gradually been learning more and more about Linux’s killer app, the Terminal. As my career is developing I find I spend more and more time in the shell and I’m constantly finding quicker and easier ways to do common things using the command line.
I always knew the standard bash shell could be configured and modified, but I could never justify the time to play around with it.
I recently came across Fish Shell. Fish shell is a modern replacement for the bash shell and comes with loads of cool features including:
- Auto suggestions
- Syntax highlighting
- Better completions
- Friendly help pages
- Colours!
Best of all it gives you most of these features straight out of the box.
Here’s how I installed Fish Shell on my Ubuntu 14.04 machine.
sudo apt-get install fish
If you aren’t using Ubuntu, you can find downloads for other Linux distros, OSX and even Windows on the Fish Shell homepage.
You can try out fish shell from your existing bash terminal by simply typing fish
.
If you like what you see, you can set fish to be the default terminal:
chsh -s /usr/bin/fish
Then logout and log back in.
It gets even better
Fish shell by itself is a huge improvement on bash, but for me it got even better when I found the Oh my fish project.
The Oh my fish project page has detailed installation instructions and I’m not going to repeat them here.
Once you have Oh my fish installed, edit the ~/.config/fish/config.fish
file to specify the themes and plugins you want to use.
I’m using the following plugins:
- git
- rails
- rvm
- sublime
- node
The default theme is great - it gives a nice neat command line prompt and git repository information in the command prompt.
As I use a mix of Mercurial and Git, I decided to change this theme slightly to also show Mercurial repo information on the command prompt.
I copied my theme from the default robbyrussell
theme. Click on the link below to see the full code for my theme.
If you would like to use my theme, just copy the code above to:
~/.oh-my-fish/themes/peterarmstrong/fish_prompt.fish
Then in your ~/.config/fish/config.fish
file, change the theme line to
# Theme
set fish_theme peterarmstrong
I’ve really enjoyed using Fish Shell for the past while and now feel like I’d be lost without it! I hope you get a chance to try out Fish Shell. If you do, let us know how you get on by posting a comment or sharing your config file in the forum!