mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-20 03:13:33 +01:00
15 lines
408 B
Bash
15 lines
408 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 "WARNING: npm-path must be available for the oh-my-zshell npm-path module to update your PATH. Perhaps \`npm --global install npm-path\` will help."
|
|
return
|
|
fi
|
|
|
|
export PATH=$(npm-path)
|
|
}
|
|
|
|
precmd_functions+="zsh-node_modules-bin-update-path"
|