A two line prezto prompt that displays the current nvm
node
version and, when available, git
information about the repo that you are currently working with.
Shown using Operator Mono with Sauce Code Pro Nerd Font for non-ASCII characters
- NodeJS version
- Git branch
- Git dirty changes
- Git commits behind
- Git commits ahead
This prompt takes advantage of symbols provided with Nerd fonts (os icons and nodejs logo).
It looks best with a duotone color scheme. I've included an iTerm
theme in the repo to make things easier on setting ANSI colors. If you use another terminal app, I'll list out the colors used in the above iTerm
color theme.
-
Update your color theme. You can use the provided iTerm color theme or modify your terminal with the ANSI colors below
-
Head over to https://github.com/ryanoasis/nerd-fonts and install your favorite nerd font (I use Sauce Code Pro)
You need one of these to get the arrow separators, OS icons, and NodeJS logo
-
Clone to your external prezto prompts
git clone https://github.com/cdonohue/prezto-clean-prompt.git ~/.zprezto/modules/prompt/external/clean
- Link the prompt
ln -s ~/.zprezto/modules/prompt/external/clean/prompt_clean_setup ~/.zprezto/modules/prompt/functions
- Verify that you have the
git
module loading in your.zpreztorc
file
- Update your
.zpreztorc
to use theclean
prompt
Ansi color | Hex color |
---|---|
Black | #49495a |
Red | #fe7734 |
Green | #8686cb |
Yellow | #fe7734 |
Blue | #bebeef |
Magenta | #ff8b42 |
Cyan | #5b5b7b |
White | #d9d9e2 |
BrightBlack | #fe7734 |
BrightRed | #fe7734 |
BrightGreen | #bebeef |
BrightYellow | #bf7c57 |
BrightBlue | #bebeef |
BrightMagenta | #be7b55 |
BrightCyan | #bdebe4 |
BrightWhite | #f2f2f2 |
MIT License 2017 © Chad Donohue