handle case where ~/.rvm/bin/rvm-prompt is not in path, so "which" can't find it

This commit is contained in:
Brent Faulkner committed 2012-02-12 12:27:06 -05:00
1 parent fbf5b0ecb6
commit b62a3e8960
6 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -1,7 +1,7 @@
# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
if which rvm-prompt &> /dev/null; then
if [ -e ~/.rvm/bin/rvm-prompt ]; then
PROMPT='%{$fg[green]%}%~%{$reset_color%} %{$fg[red]%}‹$(~/.rvm/bin/rvm-prompt i v)› %{$reset_color%} $(git_prompt_info)%{$reset_color%}%B$%b '
else
if which rbenv &> /dev/null; then