ZSH and the Pure Prompt

When I updated my MacBook Pro to Catalina to try out the new SwiftUI Canvas feature in Xcode 11, it updated the shell in Terminal from Bash to ZSH.

I am not a heavy user of the Terminal, but I still noticed this change right away because all of the sudden my prompt was ugly and verbose.

I spend enough time working with git via the command line that I knew immediately that I had to fix this.

As I was researching how to change the ZSH prompt, I discovered Pure, a custom prompt that claimed to be a “pretty, minimal and fast ZSH prompt”. I installed it and tried it out.

It splits the prompt onto two lines. The top line shows your current directory path, and the second is your prompt, which is represented simply by the character.

The real power of Pure comes in when you navigate to a directory that is part of a git repository.

To the right of the directory, it shows the repository’s git status:
master: The current branch.
*: Working copy has uncommitted changes.
: There are commits that have not been pushed.
: There are commits are available to pull.

Since the main thing I use Terminal for is quick git actions, sticking with Pure was a no-brainer. I even switched to ZSH on my work iMac (that is still running Mojave) so I could use it there over the summer.

If you want to try it out, first make sure you are using ZSH. If you are on Catalina, you should be all set here. If not you can still make ZHS your shell by following these instructions from Apple (hat tip to Stephen Hackett for that link).

Once you are running ZSH, open Terminal and install pure-prompt using npm.

npm install --global pure-prompt

After that, add some simple loading instructions to ~/.zshrc

autoload -U promptinit; promptinit
prompt pure

After restarting Terminal, you will be all set.

The only negative thing that I have found with Pure is that clearing the screen using ⌘K no longer works properly (it cuts off the first line that shows the current directory).

I was able to work around this by switching to clearing my screen with ⌃L instead.

We took the kids to Disney World this week. I always thought it would be cool, but would be one of those things that didn’t live up to the hype. I was wrong, it lived up to all the hype.

Made a little trip out to the Cape last night to watch the SpaceX Dragon capsule launch. This was my attempt at a long exposure photo.

Meet Paul George, Destroyer of Worlds →

Dan Devine for The Ringer:

This season, George is combining usage and offensive efficiency to a degree matched only by some of the best offensive players ever-and, wonderfully, 2011 Kevin Martin-and establishing himself as a Defensive Player of the Year candidate. Giannis Antetokounmpo is on the best team in the Eastern Conference and putting up numbers we haven’t seen since Peak Kareem. James Harden is authoring the seventh-highest-scoring season in NBA history while pairing scoring and playmaking efficiency at unprecedented levels to carry a wounded, limited team into a fight for home-court advantage in the West. Their MVP bona fides seem unassailable. And yet, here stands George, assailing them.

PG has been so much fun to watch this year. OKC fans are spoiled to get to watch him and Russ play together every night.

Why Forecasts Are So Accurate Now →

Robinson Meyer for The Atlantic:

Meteorologists have never gotten a shiny magazine cover or a brooding Aaron Sorkin film, and the weather-research hub of Norman, Oklahoma, is rarely mentioned in the same breath as Palo Alto. But over the past few decades, scientists have gotten significantly—even staggeringly—better at predicting the weather.

When working on a side project in my spare time, I have to take risks that I would not normally consider. Today’s example is eating a biscuit on the same desk as my MacBook Pro with a butterfly keyboard.

I need some help with app names.

I’m working on 2 apps, a strength training / weight lifting app and a food tracking app for iPhone and Apple Watch.

I prefer the names fit together, but that’s not a requirement. Only requirement is they be available without subtitles.


I got rid of my second monitor at work because open space and photos of my family are better to look at than email and Twitter. (16/365)

← Previous Page