fish(Friendly Interactive Shell)

Written by BinnyVA on April 8, 2007 – 1:00 pm -

fish(Friendly Interactive Shell) is a new shell for Linux. I tried it out and have decided to dump bash for fish. Try it out – you will come to the same conclusion as well.

Features of fish

Syntax Coloring

The shell colorizes the commands as you type them – if it is a valid command it will have a green color. For example, lets say I want to see my network interfaces. Recently, I had a lot of use for that – but that is another post. So, I type ifconfig into the shell. When I am at ‘ifco’, the shell will be like this…

Ifco - Typing completion

When I have completed the command, ifconfig, the shell will be like this…


Strings, matching etc. are also highlighted as you type.

Syntax Highlighting

Tab Completion

You would not think that this is a new feature. Bash has tab completion. Even Windows XP’s DOS terminal has tab completion. But fish’s tab completion is no ordinary tab completion – think of it as tab completion on steroids.

fish’s tab completion implements a feature that I really needed – tab completion for subcommands. Subcommand is the command line argument that is given to some programs. For example,

yum update gimp
cvs commit file.php

In the first example, yum is the command an ‘update‘ is the subcommand. Just type ‘yum upd’ and press Tab to complete the command. Similarly in the second case cvs is the command and commit is the subcommand.

Many other completions are also supported…

  • Commands, both builtins, functions and regular programs.
  • Environment variable names (Eg. $HOME).
  • Usernames for tilde(~) expansion.
  • Filenames, even on strings with wildcards such as ‘*’, ‘**’ and ‘?’.
  • Job id, job name and process names for process expansion. This is very useful when using kill.

Enough talking. You can download the fish shell from their official website. For Red Hat/Fedora Core users, this command will do the trick.

yum install fish

If you are a debian or Ubuntu user, use this command

apt-get install fish | Digg it | reddit | StumbleUpon

Tags: , , ,
Posted in Command Line, Tools | 5 Comments »

5 Comments to “fish(Friendly Interactive Shell)”

  1. […] this blog has been around for some time. The first article appeared on April 8. But I did not announce it so that there can be a build up of articles before […]

  2. suzume says:

    Completion ~ not Complition :)

  3. BinnyVA says:

    Thanks for letting me know – its fixed now.

  4. […] is yet another method – I got this idea from the fish shell. In this approach, the big path will appear […]

  5. Y.Chaouche says:

    The bash that is shipped in my ubuntu does all the completions that you pointed out in this article. I think this is not new to fish. On Debian|Ubuntu, there’s a file called /etc/bash_completion that does the job, helped with the files in the /etc/bash_completion.d/ directory (completions for subversion, django, paster, debconf, apache, openoffice etc.)

    Based on your overview, the only thing that it does is syntax coloring on the fly.

Leave a Comment