Skip to content

Instantly share code, notes, and snippets.

View aluzed's full-sized avatar

Alex P. aluzed

  • Upg
  • PARIS
View GitHub Profile
@aluzed
aluzed / npm_bin
Created June 1, 2018 10:21 — forked from arnaudcourtecuisse/npm_bin
Add this in your .bashrc to have your local node_modules/.bin in your path
PROMPT_COMMAND=__prompt_command
__prompt_command() {
# Remove previous existing .bin in $PATH
PATH=$(echo $PATH | sed -e "s@[^:]\+node_modules/.bin@@ ; s/\(^:\|:$\)// ; s/::/:/")
# Add current .bin and export
export PATH=$(npm bin):$PATH
}