mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-01 04:30:37 +02:00
Merge 71700cdd1c into 5667161d49
This commit is contained in:
commit
006ddb48f7
1 changed files with 15 additions and 0 deletions
15
plugins/npm-path/npm-path.plugin.zsh
Normal file
15
plugins/npm-path/npm-path.plugin.zsh
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
zsh-npm-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-npm-path"
|
||||
Loading…
Add table
Add a link
Reference in a new issue