Oh My Zsh

  • zsh
Oh My Zsh and Tux
As I'll be working with OSX a lot more from now on, I've taken the leap and switched to zsh. I've spent some time tweaking the zsh prompt config so I get the same information as I did with bash.

It looks like I'll be working with OSX a lot more from now on. So I've taken the leap and switched over to zsh. Naturally, I had to spend some time tweaking the prompt to get all the information that I need. zsh has a very different prompt configuration syntax to bash and after playing around with it manually, I remembered a friend of my recommended Oh My Zsh as a great framework for configuring zsh. I've created a fork of the ohmyzsh repo so I can install my own prompt by default.

Switching over to Zsh

chsh -s $(`which zsh`) $USER

Installing

To install my ohmyzsh fork:

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

You should see something like this:

Installing my fork of Oh My Zsh

Git Status

This prompt shows the local git branch name, the HEAD SHA1, and various coloured symbols for different states the repository is in.

zsh git status

Setting up tmux to use zsh

tmux defaults to bash even after I changed the default shell to zsh using chsh.

I had to add the following line to my ~/.tmux.conf:

set-option -g default-shell /bin/zsh