ohmyzsh/plugins/npm-path/npm-path.plugin.zsh
Shahar 9157b7c7de Renamed node_modules-bin module to npm-path
Now uses npm-path instead of very slow `npm bin`
2015-07-10 04:52:11 +03:00

15 lines
345 B
Bash

zsh-node_modules-bin-update-path() {
if [[ ! -x $(which npm) ]]; then
# there is no npm
return
fi
if [[ ! -r $(which npm-path) ]]; then
echo "npm-path must be available for the oh-my-zshell npm-path module to update your PATH"
return
fi
export PATH=$(npm-path)
}
precmd_functions+="zsh-node_modules-bin-update-path"