Home

Awesome

[prompt][blocks]

Minimal (node.js + git) theme for oh-my-zsh.

image

image

Installation

  1. Clone the repo
  2. Place the promptblocks.zsh-theme file in your $ZSH_CUSTOM/themes directory
  3. In your ~/.zshrc file: ZSH_THEME="promptblocks"
  4. Reload zsh: source ~/.zshrc

Misc

Node version managers - display live Node.js version

If you are using a Node.js version manager, like nvm, node version in the prompt won't be updated when you switch.

In order to achieve this, you can create a custom function in your ~/.zshrc file that will source your zsh config every time you change Node version*.

If using nvm, this function can look like this:

function nv ()  { nvm use $1 && source ~/.zshrc }

Now, you can use your new nv command to switch Node version and reload prompt:

nv 20