cdonohue / prezto-clean-prompt

⌨️ Prezto prompt providing node and git information

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

prezto-clean-prompt

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.

Clean prompt

Shown using Operator Mono with Sauce Code Pro Nerd Font for non-ASCII characters

Features

  • 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.

Installation

  1. Update your color theme. You can use the provided iTerm color theme or modify your terminal with the ANSI colors below

  2. 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

  3. Clone to your external prezto prompts

git clone https://github.com/cdonohue/prezto-clean-prompt.git ~/.zprezto/modules/prompt/external/clean
  1. Link the prompt
ln -s ~/.zprezto/modules/prompt/external/clean/prompt_clean_setup ~/.zprezto/modules/prompt/functions
  1. Verify that you have the git module loading in your .zpreztorc file

zpreztorc-git

  1. Update your .zpreztorc to use the clean prompt

zpreztorc-prompt

Color configuration

Foreground: #8686cb

Background: #24242e

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

License

MIT License 2017 © Chad Donohue

About

⌨️ Prezto prompt providing node and git information

License:MIT License