This commit is contained in:
Slava 2017-05-05 19:11:49 +00:00 committed by GitHub
commit 582913b16b

View file

@ -1,15 +1,17 @@
(( $+commands[npm] )) && { (( $+commands[npm] )) &&
__NPM_COMPLETION_FILE="${ZSH_CACHE_DIR}/npm_completion" {
if [[ ! -f $__NPM_COMPLETION_FILE ]]; then COMPLETION="${ZSH_CACHE_DIR}/npm_completion"
npm completion >! $__NPM_COMPLETION_FILE 2>/dev/null
[[ $? -ne 0 ]] && rm -f $__NPM_COMPLETION_FILE if [[ ! -f $COMPLETION ]]; then
npm completion 2>/dev/null >! $COMPLETION
source $COMPLETION
else
source $COMPLETION
npm completion 2>/dev/null >! $COMPLETION &
fi fi
[[ -f $__NPM_COMPLETION_FILE ]] && source $__NPM_COMPLETION_FILE unset COMPLETION
unset __NPM_COMPLETION_FILE
}
# Install dependencies globally # Install dependencies globally
alias npmg="npm i -g " alias npmg="npm i -g "
@ -43,4 +45,4 @@ alias npmst="npm start"
# Run npm test # Run npm test
alias npmt="npm test" alias npmt="npm test"
}