From d928464409ad9fe79cce915eca9cd28944655334 Mon Sep 17 00:00:00 2001 From: "Deavon M. McCaffery" Date: Wed, 11 Oct 2017 15:27:42 -0700 Subject: [PATCH] fix(npm): fix npm completion order issue --- src/scripts/set-nvm.sh | 2 +- src/scripts/set-prompt.sh | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/scripts/set-nvm.sh b/src/scripts/set-nvm.sh index 07ada30..38c0d14 100644 --- a/src/scripts/set-nvm.sh +++ b/src/scripts/set-nvm.sh @@ -18,9 +18,9 @@ __prompt-set-nvm() fi export NVM_DIR="$HOME/.nvm" - source "$nvm_path/nvm.sh" fi nvm use --lts + eval "$(npm completion)" } \ No newline at end of file diff --git a/src/scripts/set-prompt.sh b/src/scripts/set-prompt.sh index 5910c21..22158eb 100644 --- a/src/scripts/set-prompt.sh +++ b/src/scripts/set-prompt.sh @@ -39,10 +39,6 @@ __prompt-set-prompt() { eval "$(grunt --completion=bash)" 1>/dev/null 2>&1; fi - if type npm 1>/dev/null 2>&1; then - eval "$(npm completion)" 1>/dev/null 2>&1; - fi - if type kubectl 1>/dev/null 2>&1; then eval "$(kubectl completion bash)" 1>/dev/null 2>&1; fi