mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-18 03:11:15 +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>
|
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
|
* unposted (cf. 43800): Completion/Zsh/Command/_strftime: Update
|
||||||
strftime completion for nanoseconds change
|
strftime completion for nanoseconds change
|
||||||
|
|
||||||
|
|
|
@ -2,8 +2,13 @@
|
||||||
|
|
||||||
# Node Package Manager completion, letting npm do all the completion work
|
# Node Package Manager completion, letting npm do all the completion work
|
||||||
|
|
||||||
if type npm > /dev/null; then
|
if (( $+commands[npm] )); then
|
||||||
eval "$(npm completion)"
|
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 "$@"
|
_npm_completion "$@"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue