Oh my Zsh! / Oh my Posh!

installing oh my zsh and oh my posh!

Oh my Zsh! / Oh my Posh!

I am liking this cute terminal plugin that neatly shows not only the folder structure but he git branch you are on with an indication of its status.

The two flavours "Oh my Zsh" and "Oh my Posh" are for the Zsh shell
and Powershell terminals respectively and follow the same install process.

Installation

Pre-requisites

  • zsh shell is installed (sudo apt install zsh)
  • optional: change default shell (chsh -s $(which zsh))

First install Oh my Zsh or Oh my Posh

The installation should include a step where you edit your ~/.zshrc file for the font:

[ZSH_THEME="robbyrussell"] to [ZSH_THEME="agnoster"]

And that should be it!

But, like me you may face challenges in getting the Powerline fonts to work with Visual Studio Code. There is a lot of help out there on it, but not all of it helped me.

So here is how I solved it.

Solving the font problem

Install the Powerline fonts directly from the repository

# clone 
git clone https://github.com/powerline/fonts.git --depth=1 

# install cd fonts 
./install.sh 

# clean-up a bit 
cd .. 
rm -rf fonts

Edit Visual Studio Code terminal font

File -> Preferences -> terminal.integrated.fontFamily": "Meslo for Powerline"

The example above shows the font being set is Meslo for Powerline but on one of my machines the font was Menlo for Powerline. I believe this is because I used a different source for the font installation sudo apt-get install fonts-powerline