Skip to content

Instantly share code, notes, and snippets.

View nunofgs's full-sized avatar

Nuno Sousa nunofgs

  • Customer.io
  • Braga, Portugal
  • X @nunofgs
View GitHub Profile
@nunofgs
nunofgs / npm_chpwd_hook.sh
Last active November 9, 2020 02:09 — forked from puffnfresh/npm_chpwd_hook.sh
Adds node_modules/.bin to the PATH (zsh)
if ((!$+commands[npm])); then
return 1
fi
# Adds node_modules/.bin to the PATH
npm_bin_hook() {
if [ -n "${OLDPATH+x}" ]; then
PATH=$OLDPATH
unset OLDPATH
fi