Merry Christmas everyone πŸŽ…πŸ»πŸŽ„

For today’s blog post, I am re-publishing an article I originally wrote for my company blog on 7th May 2017.


In all likelihood, since I started using a Mac, I have been using the stock Terminal with the Pro theme. This has mostly suited me well, but there are a handful of things I always thought could be improved.

Inspired by a blog post and a colleague at work who recently showed me their shell, reignited my interest in updating my setup. This article is the result of the steps I used to set up my terminal.

  • Install the excellent iTerm2 which brings some nifty features.

  • On newer versions of macOS, simply update the version of zsh by:

brew install zsh zsh-completions
  • On older versions of macOS (before Catalina I believe), set up zsh as the default shell. Snipped from the setup instructions:
brew install zsh zsh-completions
echo "/usr/local/bin/zsh" >> /etc/shells
chsh -s $(which zsh)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone [email protected]:powerline/fonts.git
./install.sh
  • Change font used in iTerm2:

    1. Navigate to Profiles
    2. Then Text
    3. Choose Roboto Mono Light for Powerline
    4. Bump the default font size to 14
  • Edited my ~/.zsh file:

  • Add DEFAULT_USER="<your username>" to stop seeing user@host

  • Update the plugins so plugins=(git git-flow git-extras web-search)

  • Changed colour present in iTerm2 to ‘Darkside


Once all this is done, this is what your shell should look like:

Supercharged Terminal

You can see the time, current working directory and git status in my prompt. Also, notice the git status showing the current branch master, tag v0.3, the ● representing changes and lastly the ? to signify a new file. Pretty cool, huh?


Update: Found this interesting counter article since posting

Update 2: Installing the Shell Integration enables extremely handy shortcuts like Cmd+Shift+A to select previous commands output and Auto Command Completion

Update 3: zsh is now the default shell in macOS, so clarified that switching shells only relates to the older versions

Update 4: Clarify font settings in iTerm2

Update 5: Update ZSH theme to Powerlevel10k