summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorHaoZeke <rohit.goswami@aol.com>2019-01-04 23:59:05 +0300
committerDominik Ritter <dritter03@googlemail.com>2019-01-25 10:36:12 +0300
commit58f70e57e65097e73604e35b8e8334a8e34afbee (patch)
tree6413c717bd3028f94701ed0aa7c5643f07cfe5ba /powerlevel9k.zsh-theme
parenta41f2e81ae30a5e64269c8079e75acfd878a6cb8 (diff)
rvm: Use @natemccurdy review suggestions
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme8
1 files changed, 5 insertions, 3 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index bed5b9cc..fc8c4703 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -1365,10 +1365,12 @@ prompt_rspec_stats() {
################################################################
# Segment to display Ruby Version Manager information
prompt_rvm() {
- local version_and_gemset=${$(rvm-prompt v p)/ruby-}
+ if [ $commands[rvm-prompt] ]; then
+ local version_and_gemset=${$(rvm-prompt v p)/ruby-}
- if [[ -n "$version_and_gemset" ]]; then
- "$1_prompt_segment" "$0" "$2" "240" "$DEFAULT_COLOR" "$version_and_gemset" 'RUBY_ICON'
+ if [[ -n "$version_and_gemset" ]]; then
+ "$1_prompt_segment" "$0" "$2" "240" "$DEFAULT_COLOR" "$version_and_gemset" 'RUBY_ICON'
+ fi
fi
}