From 598f0d956d7c4a800d0b781d7c034580fca4241a Mon Sep 17 00:00:00 2001 From: Lyncredible Date: Wed, 26 Jul 2017 20:45:20 -0700 Subject: [PATCH] Do not show nvm/node prompt if neither is installed --- bullet-train.zsh-theme | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bullet-train.zsh-theme b/bullet-train.zsh-theme index b7c7c9a..e74f3d1 100644 --- a/bullet-train.zsh-theme +++ b/bullet-train.zsh-theme @@ -522,8 +522,10 @@ prompt_nvm() { if type nvm >/dev/null 2>&1; then nvm_prompt=$(nvm current 2>/dev/null) [[ "${nvm_prompt}x" == "x" ]] && return - else + elif type node >/dev/null 2>&1; then nvm_prompt="$(node --version)" + else + return fi nvm_prompt=${nvm_prompt} prompt_segment $BULLETTRAIN_NVM_BG $BULLETTRAIN_NVM_FG $BULLETTRAIN_NVM_PREFIX$nvm_prompt