Making Terminal awesome in MacOS

How are we going to make Terminal awesome? Using Oh My Zsh of course. Now, I know there are countless blogs written on this topic, but I just wanted to make a personal note of this so that the next time I change my computer, I don’t forget. So here goes.

  1. Install Zsh if you don’t have one. Follow this.
  2. Make Zsh your default shell.
    – Do this: chsh -s $(which zsh)
    – Ensure you have your Terminal pointing to Default login shell. Preferences | General | Shells open with
    – Restart Terminal
  3. Install Oh My Zsh. Follow this. But essentially you need to do this:
    sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
  4. A .zshrc file will be created under /Users/XXXXXXX . Just like .bash_profile is for bash, .zshrc is for zsh.
    – Open the file
    – Uncomment export PATH=$HOME/bin:/usr/local/bin:$PATH
    – Set ZSH_THEME="agnoster"
  5. For agnoster to work properly you need to install Powerline fonts as mentioned here. There are many fonts to choose from, but I choose Meslo LG L DZ.
  6. Oh My Zsh doesn’t have the auto suggestion plugin installed by default. So you need to install that using this
  7. Your .zshrc file should have something like this:
     plugins=(
       git
       zsh-autosuggestions
       gradle
     )
    
  8. If you want to get rid of the pesky username ‘something@xxxx’, then add prompt_context() {} to the last line of the .zshrc file.
  9. Now when you open the Terminal, you many not like it at first instant due to some character missing (because of improper font) or the awkward color scheme. I have customised the color and you can import my settings.
    I have chosen a lighter color scheme.
    Color Scheme
  10. There you go. Enjoy your awesome Terminal.



Note: If you are using IntelliJ iDEA, then this will reflect in that as well. Just ensure you do these things:
– Preferences | Tools | Terminal | Shell path = bin/zsh
– Preferences | Editor | Color Scheme | Console Font | Font = Meslo LG L DZ
– Preferences | Editor | Color Scheme | Console Colors | Import Scheme = profile