Wednesday, May 13, 2015

Setup iTerm2, zsh, oh-my-zsh and powerline fonts on OSX

After waiting for a long time, I finally updated my Mac to OSX 10.10. Right after the installation, the usual tweaking process begins to make you feel at home. These are my notes to make the shell look good.
I wanted z-shell, oh-my-zsh and these modified powerline fonts to make the command prompt look cool.
If you want to follow these steps, it's recommended to have homebrew installed to install zsh-shell.

Ready, set, go!

Open your terminal and prepare to type.


The easiest way it to install iTerm2 with homebrew. Run this command:
brew install iTerm2


Run this command curl -L | sh


Powerline is a project that provides tools to customize the status line and command prompt of several applications. To achieve this, they use special glyphs that are available through patched fonts. These are the powerline fonts. Download the font from here and install it by double clicking. This will open the Font Book application and install the font for you.


Now it's time to put everything together.
  1. Open iTerm2
  2. Go to Preferences -> Profiles -> Default -> General and type /bin/zsh into the text field next to Command (this will use zsh instead of your default shell)
  3. Go to Preferences -> Profiles -> Default -> Text and change the Regular Font and the Non-ASCII Font to 11pt Inconsolata-dz for Powerline
  4. open ~/.zshrc with your favorite text editor and change ZSH_THEME to agnoster
That's it. Make sure to start/restart iTerm to see all the changes.


oh-my-zsh Powerline change osx shell

No comments: