mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-26 21:51:05 +01:00
commit
ac9a8cb687
1 changed files with 5 additions and 2 deletions
|
@ -2,10 +2,13 @@
|
||||||
__NPM_COMPLETION_FILE="${ZSH_CACHE_DIR}/npm_completion"
|
__NPM_COMPLETION_FILE="${ZSH_CACHE_DIR}/npm_completion"
|
||||||
|
|
||||||
if [[ ! -f $__NPM_COMPLETION_FILE ]]; then
|
if [[ ! -f $__NPM_COMPLETION_FILE ]]; then
|
||||||
npm completion >! $__NPM_COMPLETION_FILE || rm -f $__NPM_COMPLETION_FILE
|
npm completion >! $__NPM_COMPLETION_FILE 2>/dev/null
|
||||||
|
[[ $? -ne 0 ]] && rm -f $__NPM_COMPLETION_FILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
source $__NPM_COMPLETION_FILE
|
[[ -f $__NPM_COMPLETION_FILE ]] && source $__NPM_COMPLETION_FILE
|
||||||
|
|
||||||
|
unset __NPM_COMPLETION_FILE
|
||||||
}
|
}
|
||||||
|
|
||||||
# Install dependencies globally
|
# Install dependencies globally
|
||||||
|
|
Loading…
Reference in a new issue