Thorsten’s Powerline Inspired Prompt Theme for ZSH
This is derived from agnoster’s theme.
In order for this theme to render correctly, you will need a Powerline-patched font.
In addition, it is currently only tested on a gnome-terminal with TERM=xterm-256color and a black-on-white theme, and there might be dependencies on oh-my-zsh in it.
The aim of this theme is to only show you relevant information. Like most prompts, it will only show git information when in a git working directory. However, it goes a step further: everything from the current user and hostname to whether the last call exited with an error to whether background jobs are running in this shell will all be displayed automatically when appropriate.
There are a few modifications to agnoster’s:
- Space optimized – most whitespace removed
- RPROMPT support – much of the information moves to the right side (which hides automatically when typing longer commands)
- path is left-truncated if the left prompt would be too long
- more details in the optional status (number of bg jobs etc.)
- more info in the git prompt, modified version of scripts by Seth House
- context, i.e. [email protected]: white on black. Only if user ≠ $DEFAULT_USER or in a ssh session
- current dir, truncated left if ≥ 30 characters. black on light gray
Status info, if applicable:
✘‹number›if exit code of last command ≠ 0
⚙«number›number of background jobs
Git info, if applicable:
- background green = clean repo, yellow = dirty repo
- branch name, prefixed with if this is a remote-tracking branch
↑n= n commits ahead of upstream branch
↓n= n commits behind upstream branch
☰ n= there are n stashes
✎= there are unstaged changes to tracked files
+= there are uncommitted changes in the index
There is also an action format for when you’re in a merge etc.
- virtuelenv name in white on blue