浏览代码

Peepcode theme: Don't try to use RVM if it's not available (#5154)

Harald Nordgren 8 年之前
父节点
当前提交
53acf21182
共有 1 个文件被更改,包括 7 次插入1 次删除
  1. 7 1
      themes/peepcode.zsh-theme

+ 7 - 1
themes/peepcode.zsh-theme

@@ -41,4 +41,10 @@ PROMPT='
 %~
 %~
 ${smiley}  %{$reset_color%}'
 ${smiley}  %{$reset_color%}'
 
 
-RPROMPT='%{$fg[white]%} $(~/.rvm/bin/rvm-prompt)$(git_prompt)%{$reset_color%}'
+if [[ -d ~/.rvm ]] && [[ -e ~/.rvm/bin/rvm-prompt ]]; then
+    rvm_prompt='$(~/.rvm/bin/rvm-prompt)'
+else
+    rvm_prompt=''
+fi
+
+RPROMPT='%{$fg[white]%} $rvm_prompt$(git_prompt)%{$reset_color%}'