add npmbrew plugin

This commit is contained in:
Will Boyce 2014-04-29 15:28:04 +01:00
commit 3173c9675e

View file

@ -0,0 +1,11 @@
function _npm_brew_paths() {
local old_eglob=$(setopt | grep '^extendedglob$')
[ -z ${old_eglob} ] && setopt extendedglob
echo /usr/local/lib/node_modules/^npm/bin
[ -z ${old_eglob} ] && setopt noextendedglob
}
# add /usr/local/lib/node_modules/^npm/bin to PATH
for p in `_npm_brew_paths`;
[ -d $p ] && path=($p $path)
unset _npm_brew_paths