Create and cache npm completion on first run
Signed-off-by: Marc Cornellà <marc.cornella@live.com>
This commit is contained in:
Родитель
4b9772fffe
Коммит
7c1ca0e4d8
|
@ -1,4 +1,10 @@
|
|||
eval "$(npm completion 2>/dev/null)"
|
||||
__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
|
||||
|
||||
source $__NPM_COMPLETION_FILE
|
||||
|
||||
# Install dependencies globally
|
||||
alias npmg="npm i -g "
|
||||
|
|
Загрузка…
Ссылка в новой задаче