The thoughts, opinions, happenings, and just plain ramblings of a seemingly boring person.

Migrating to Zsh

A few years back, I posted on open-sourcing my .bashrc file on GitHub. Up until very recently, I'd been using the same configuration (with some additions and updates) ever since.

Now that I work on a MacBook Pro (btw, I've been meaning to write a blog post on that), and Apple recently announced that they will be changing the default shell in the next version of MacOS from bash to zsh, I decided to make the change myself.

I've always been tempted by the increased friendliness that Zsh has to offer. However, I couldn't really justify the amount of effort involved in switching over and getting my shell prompt the way I like it. It took a looong time for me to get bash to a point that I was happy with!

Since having my liver transplant, I decided the migration to Zsh was something that I could do before going back to work. At least it would help me get re-acclimated to my work computer and MacOS in general.

I think I've now gotten Zsh to my satisfaction, and of course, you can find my .zshrc configuration on GitHub.

Setting the terminal to use Zsh as the default shell was extremely easy, but of course nearly all of the time and effort was spent in getting the prompt the way I wanted.

Specifically, it is having git repository stats displayed on the prompt. A lot of Zsh frameworks and plugins can show basic git repo info (like clean/dirty state), but very few do things like breaking that down to show the number of modified/untracked/staged/etc. files directly on the prompt.

I am using oh-my-zsh as a framework, but for theming I ended up using the excellent Powerlevel10k (which is itself a reimplementation of Powerlevel9k). I briefly used oh-my-zsh's native theming, but decided that what I was wanting was slightly more advanced. A great thing about Powerlevel10k is the fantastic git repo information reporting, which is more advanced than Powerlevel9k, not to mention being faster.

It's still early days, but I think the change has been worth the effort. Not only do I have access to all the friendly Zsh features, but I think the look of the prompt is decent (albeit minor) upgrade on my previous bash configuration.

As always, feel free to copy/clone/fork/use my config for yourself!

2 thoughts on “Migrating to Zsh”

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.