Pretty, minimal and fast ZSH prompt

Sindre Sorhus
11.3k stars
915 forks

Pretty, minimal and fast ZSH prompt


Most prompts are cluttered, ugly and slow. We wanted something visually pleasing that stayed out of our way.


  • Comes with the perfect prompt character. Author went through the whole Unicode range to find it.
  • Shows git branch and whether it's dirty (with a *).
  • Indicates when you have unpushed/unpulled git commits with up/down arrows. (Check is done asynchronously!)
  • Prompt character turns red if the last command didn't exit with 0.
  • Command execution time will be displayed if it exceeds the set threshold.
  • Username and host only displayed when in an SSH session or a container.
  • Shows the current path in the title and the current folder & command when a process is running.
  • Support VI-mode indication by reverse prompt symbol (Zsh 5.3+).
  • Makes an excellent starting point for your own custom prompt.


Colors can be configured for various parts of Pure prompt using configuration options.

As explained in ZSH's manual, color values can be:

  • A decimal integer corresponding to the color index of your terminal. If your $TERM is xterm-256color, see this chart.
  • The name of one of the following nine colors: black, red, green, yellow, blue, magenta, cyan, white, and default (the terminal’s default foreground)
  • # followed by an RGB triplet in hexadecimal format, for example #424242. Only if your terminal supports 24-bit colors (true color) or when the zsh/nearcolor module is loaded.

The following diagram shows where each color is applied on the prompt:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ user
β”‚      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ host
β”‚      β”‚           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ path
β”‚      β”‚           β”‚          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ git:branch
β”‚      β”‚           β”‚          β”‚     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ git:dirty
β”‚      β”‚           β”‚          β”‚     β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ git:action
β”‚      β”‚           β”‚          β”‚     β”‚ β”‚        β”Œβ”€β”€β”€β”€β”€β”€β”€ git:arrow
β”‚      β”‚           β”‚          β”‚     β”‚ β”‚        β”‚ β”Œβ”€β”€β”€β”€β”€ git:stash
β”‚      β”‚           β”‚          β”‚     β”‚ β”‚        β”‚ β”‚ β”Œβ”€β”€β”€ execution_time
β”‚      β”‚           β”‚          β”‚     β”‚ β”‚        β”‚ β”‚ β”‚
zaphod@heartofgold ~/dev/pure master* rebase-i ⇑ ≑ 42s
venv ❯
β”‚    β”‚
β”‚    └───────────────────────────────────────────────── prompt
└────────────────────────────────────────────────────── virtualenv (or prompt:continuation)

NOTE: oh-my-zsh overrides the prompt so Pure must be ordered after oh-my-zsh in your dotfiles.


Sindre Sorhus Mathias Fredriksson
Sindre Sorhus Mathias Fredriksson