Commit 136a8343 authored by Marc Cornellà's avatar Marc Cornellà
Browse files

npm: only load completion if npm exists

parent 3b8d0ad9
__NPM_COMPLETION_FILE="${ZSH_CACHE_DIR}/npm_completion"
(( $+commands[npm] )) && {
__NPM_COMPLETION_FILE="${ZSH_CACHE_DIR}/npm_completion"
if [[ ! -f $__NPM_COMPLETION_FILE ]]; then
npm completion >! $__NPM_COMPLETION_FILE || rm -f $__NPM_COMPLETION_FILE
fi
if [[ ! -f $__NPM_COMPLETION_FILE ]]; then
npm completion >! $__NPM_COMPLETION_FILE || rm -f $__NPM_COMPLETION_FILE
fi
}
source $__NPM_COMPLETION_FILE
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment