How to Customize iterm2 with ZSH

This blog tells you how you can make your terminal looks better with Z shell(ZSH) which is a Unix shell that can be used as an interactive login shell and as a command interpreter for shell scripting. Zsh is an extended Bourne shell with many improvements, including some features of Bash, ksh, and tcsh.

Prequisites

1. Homebrew
2. iterm2

Steps to customize iterm2 with ZSH

1. First install homebrew using
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

2. Install ZSH using below commands
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

3.Edit ~/.zshrc by typing vim ~/.zshrc and set ZSH_THEME="agnoster"

4. Restart your iterm2 terminal. But you will see [?][?] such annoying question marks in your terminal.

5. So to avoid them you need to install the source code pro fonts. To download click on this link and press download button.

6. After that I pop up will come and click on install fonts that will add those fonts in your mac.

7. After this go to iterm2-->preferences-->profiles-->text-->font.

8. Select source code pro font and restart the terminal.

9. To add autocomplete feature use
echo 'export PATH="/usr/local/opt/ncurses/bin:$PATH"' >> ~/.bash_profile