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
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…
When I have completed the command, ifconfig, the shell will be like this…
Strings, matching etc. are also highlighted as you type.
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
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
del.icio.us | Digg it | reddit | StumbleUpon