mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-04 22:51:42 +02:00
43809: Suppress npm update checks during completion
This commit is contained in:
parent
df12f6cd2f
commit
e25f890589
2 changed files with 10 additions and 2 deletions
|
@ -1,5 +1,8 @@
|
|||
2018-11-13 dana <dana@dana.is>
|
||||
|
||||
* 43809: Completion/Unix/Command/_npm: Suppress npm update checks
|
||||
during completion
|
||||
|
||||
* unposted (cf. 43800): Completion/Zsh/Command/_strftime: Update
|
||||
strftime completion for nanoseconds change
|
||||
|
||||
|
|
|
@ -2,8 +2,13 @@
|
|||
|
||||
# Node Package Manager completion, letting npm do all the completion work
|
||||
|
||||
if type npm > /dev/null; then
|
||||
eval "$(npm completion)"
|
||||
if (( $+commands[npm] )); then
|
||||
eval "$(NPM_CONFIG_UPDATE_NOTIFIER=false npm completion)"
|
||||
# Monkey-patch their function to prevent update checks
|
||||
functions[_npm_completion]="
|
||||
local -x NPM_CONFIG_UPDATE_NOTIFIER=false;
|
||||
${functions[_npm_completion]}
|
||||
"
|
||||
|
||||
_npm_completion "$@"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue