A simple, clean and minimal Zsh prompt.
- Current working directory
- Hostname (shown in remote SSH shells only)
- AWS Vault role
- Background jobs
- Current SHA (optional)
- Exit status of the last command
- Git branch and staged, unstaged, and untracked counts
- Customisable colours and symbols
- Optional asynchronous Git status
- Zsh 5.2 or newer
- Git
- Oh My Zsh, or another setup that provides its colour definitions
zsh-async(optional, for non-blocking Git status)
Download the theme, set it as the active Oh My Zsh theme, and restart Zsh:
mkdir -p "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes" && curl -fsSL https://raw.githubusercontent.com/jackharrisonsherlock/common/master/common.zsh-theme -o "${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/common.zsh-theme" && omz theme set common && exec zshCommon works without additional dependencies. By default it uses zsh-async when the plugin has already been loaded, and falls back to synchronous Git status otherwise.
To use asynchronous status, load zsh-async before Common. To force synchronous status, set this before loading the theme:
COMMON_GIT_ASYNC=falseSet options before loading Common. The examples below show the defaults:
COMMON_PROMPT_SYMBOL="❯"
COMMON_COLORS_HOST_ME=green
COMMON_COLORS_HOST_AWS_VAULT=yellow
COMMON_COLORS_CURRENT_DIR=blue
COMMON_COLORS_RETURN_STATUS_TRUE=magenta
COMMON_COLORS_RETURN_STATUS_FALSE=yellow
COMMON_COLORS_GIT_STATUS_DEFAULT=green
COMMON_COLORS_GIT_STATUS_STAGED=red
COMMON_COLORS_GIT_STATUS_UNSTAGED=yellow
COMMON_COLORS_GIT_PROMPT_SHA=green
COMMON_COLORS_BG_JOBS=yellow
COMMON_GIT_STAGED_SYMBOL="+"
COMMON_GIT_UNSTAGED_SYMBOL="!"
COMMON_GIT_UNTRACKED_SYMBOL="?"
COMMON_GIT_ASYNC=trueGit state is displayed explicitly as well as with colour. For example, main +2 !1 ?3 means two staged changes, one unstaged change, and three untracked files. A staged or mixed repository is red, an unstaged or untracked repository is yellow, and a clean repository is green.
The screenshot shows Common in Hyper with a custom theme and SF Mono.

