Fish Shell for Mac OS X Makes the Command Line Smarter & Friendlier

Jun 7, 2012 - 6 Comments

Fish Shell for Mac OS X showing autosuggestions

Are you looking for a way to make the command line a bit more user friendly? If so, you may find Fish to be a pretty nice alternative shell whether you are completely new to the OS X Terminal or you just want some general assistance when at the command line.

Riffing on the overall archaic nature of command lines, this new implementation of Fish calls itself “a command line shell for the 90s”, with some genuinely useful and (relatively) modern features like smart autosuggestions based on history, autocompletion of commands, a nice default color palette for syntax highlighting, simple web-based configuration, and more. For those of us that are more familiar with the world of shells, it’s kind of like zsh on steroids, but prettier and a bit smarter. If any of that sounds appealing and you’re anxious to explore the underpinnings of Mac OS X and the world of unix in a (slightly) user friendly way, check out Ridiculous Fish, a branch of the original fish shell that development ended on a while ago.

The package installer is the easiest way for most users to install fish in OS X, but the source is available for those who prefer to build from scratch.

Once you’ve installed Fish launch Terminal and type “fish” to enter the new shell on a session basis to start testing it out, if you like what you’re using change the default shell to fish with the following command (/bin/bash is the OS X default shell, if you want to go back):

chsh -s /usr/local/bin/fish

Fish includes some popular aliases and commands which can be seen by typing fish_config, things like the everpopular ll and la aliases, but the real magic is with the intelligent autosuggestions and autocompletions, which use shell history to predict what you want to do and to aid recall in some of the most obscure commands without grepping around in bash_history.

For those learning, the fish manual page is quite useful as well, it provides a nice general overview of unix commands and command line functions and can be accessed by typing:

man fish

This will launch the default web browser to file://localhost/usr/local/share/doc/fish/index.html, which is basically a lengthy introductory tutorial to shells in general.

All in all Fish is about as friendly as shells can get, though it’s not nearly as ambitious a reworking as the TermKit project, it’s well worth checking out.

Heads up to MacStories & HackerNews for the find.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: William Pearson in Command Line, Mac OS X, Tips & Tricks

6 Comments

» Comments RSS Feed

  1. David says:

    Interesting idea, never heard of it. I could see this being useful for newbies who want to learn though, cool find.

  2. Bruno Gama says:

    it is a pretty cool command tool but if you have a setup like bash-it it breaks all the aliases and custom completions

    • BookEmDanno says:

      I use a lot of aliases (and custom preferences) on my terminal mode. So, will this disable/mess-up those settings?

      Aloha and Thanks.

  3. Theo Vosse says:

    Intelligent suggestions in a shell command. What could possibly go wrong?

  4. richard says:

    This is a really interesting and nice looking shell but I’m scared shell-less that someone might use this as a way to key log my passwords or just about anything else. Who are these guys?

  5. Jeff says:

    I am completely baffled as to why you would refer to “TermKit” at the end of your article as an “ambitious .. reworking”, much less refer to it at all. TermKit may have been a great idea with pretty gui’s but its development was abandoned over a year ago. It was a buggy, pre-alpha project that never compiled or installed properly.

    I love OS X Daily, but I really hate lazy journalism. Please do your research before you publish.

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates