Install oh-my-zsh on Mac with iterm2

When I followed the guides I found online on this topic, this was what I ended up with:

zsh with powerline showing squares with questionmarks

Clearly, something went wrong. The zsh shell was showing squares with questionmarks in it.

After fixing, this is what oh my zsh looks like in iterm on my Macbook Pro running macOS Catalina.

oh-my-zsh now showing icons correctly

Follow the instructions on this page to get the same result.

Install oh-my-zsh

Directions taken from: https://github.com/ohmyzsh/ohmyzsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Set the the theme

I used the powerlevel9k theme from here: https://github.com/Powerlevel9k/powerlevel9k/wiki/install-instructions

git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k

Now select this theme in your ~/.zshrc file

ZSH_THEME="powerlevel9k/powerlevel9k"

Install the fonts

This is the solution to get rid of the squares with questionmarks in your oh-my-zsh installation.

It appears that the used font in the powerline uses characters which need a special / patched font. See: https://github.com/powerline/fonts

git clone https://github.com/powerline/fonts
cd fonts
./install.sh

Now configure your iTerm profile to use the Droid Sans Mono for Powerline font.

Go to Preferences > Profiles > Text > Font and select (or type) the Droid Sans Mono for Powerline font.

0 Shares
>