Why and how to install zsh and fish shell

So if you are developing in unix system, server or even mac OSX, you most likely will have used Bash shell scripting. If you have accessed the Terminal app, then you have used Bash.

What are shells?

Shells are CLIs to access the computer’s operating system without going through GUI. There are many shell systems, wikipedia has a great comparison of them.

Bash is the default login shell for OSX and most unix system.

Windows uses PowerShell.

What is zsh or fish shell?

zsh and fish are two popular variant of shells. Personally I have been using Bash for a while, until I read article about fish shell and oh-my-zsh from HackerNews. I’ve tried them both on, and I would never come back to Bash.

What’s so good about them?

The home page for fish shell has a good list of the feature, but zsh homepage is just sad.
Shortly, zsh is good to extend the functionality of Bash and it has good range of built in plugins. Once you tried oh-my-zsh and used the color schemes and plugins, I really doubt you will be back to Bash.

Fish shell is great for people who wants all the bells and whistle out of the box. It has color schemes, auto-suggestions and completion out of the box. No plugins needed. Fish is a great shell for simple uses.

Ok, what’s bad about them?

Let’s start with fish shell. One of the most glaring thing about it, is the fact that we can’t even use ‘&&’ or ‘\curl’ with it. So if you tried to use rvm install line, it will throw an error.

The same fate will be met after you installed gvm and wanted to use it with fish. This line below won’t work:

So far when I wanted to use gvm, I have had to go back to zsh or bash.

Enough about fish shell, what’s bad about zsh?
Zsh mainly needed to be extended using plugins before it has the functionality of fish. Out of the box, it isn’t that much different from bash. Only ofter installing oh-my-zsh, zsh-autosuggestion and other plugin, will it be more amazing.

How to install zsh or fish shell?

The easiest way of them all, would be to use homebrew. Just put this into bash (terminal) and let it do its thing:

after it is done, you can use the install command to install both fish and zsh

Note that even after installing one or both of these shells, OSX terminal will still opened straight to bash. You would have to change the login shell to make it open to zsh or fish directly.

note: this unix stackexchange answer has a good and brief explanation of what is a login shell

how to make zsh or fish as login shell?

in bash or terminal, simply run these commands

Most likely, bash will complain that fish or zsh is not a standard shell. If that’s the case, just try these lines to add them to the list of shells

That’s all for today. We will discuss about what or how to use those next

Hello, World!

Hello, I guess its about time I started blogging about tech stuff. There will be introduction about who I am in the ‘About’ page that is still unwritten. But for now, lets get to the code journey.

Early 90’s
During my high-school years, HTML was the first programming stuff that I’ve dabbled in. I made simple websites and one discussion forums for online game. Learned from web tutorials.

Early 2000’s
Going to Monash College started me in proper dev stuff. I learned many new things and are very grateful for it.

Middle 2000’s
Then I went on to Monash Uni enrolled in ComSci where I learned C and Unix, too bad I didn’t stick with it for too long and changed course to B of IT & System (BITS). The new course didn’t teach us any new languages, mostly business analyst kinda things.

Late 2000’s
Graduated with BITS, tried to find a job in Analyst field, but couldn’t. So I get back to dev and learned whole lot of frameworks like Joomla, Drupal, WordPress, and PHP for customising CMS.

Early 2010’s
During my professional software engineering career, I learned more than during uni times. We do learn faster on the job. Credit also has to be given to the plethora of online tutorial that arises recently. I learned from books, Codecademy, Treehouse, CodeSchool, BitFountain, etc etc. Even now I’m still learning.

Finally, my fav language so far is Swift.