From b8373a737245e46867e08e02f0e76665b0e37c5a Mon Sep 17 00:00:00 2001 From: Arno Fortelny Date: Sun, 4 May 2014 08:34:44 -0400 Subject: [PATCH] check for existence of rvm-prompt before using it --- themes/half-life.zsh-theme | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/themes/half-life.zsh-theme b/themes/half-life.zsh-theme index c8d09ce47..00ede587d 100644 --- a/themes/half-life.zsh-theme +++ b/themes/half-life.zsh-theme @@ -95,5 +95,9 @@ function steeef_precmd { } add-zsh-hook precmd steeef_precmd +if [ command -v rvm-prompt >/dev/null 2>&1 ]; then + RVM=$(rvm-prompt " with%{$fg[red]%} " v g "%{$reset_color%}") +fi + PROMPT=$' -%{$purple%}%n%{$reset_color%} in %{$limegreen%}%~%{$reset_color%}$(rvm-prompt " with%{$fg[red]%} " v g "%{$reset_color%}")$vcs_info_msg_0_%{$orange%} λ%{$reset_color%} ' +%{$purple%}%n%{$reset_color%} in %{$limegreen%}%~%{$reset_color%}$RVM$vcs_info_msg_0_%{$orange%} λ%{$reset_color%} '