Commit 8a887c50 authored by LFDM's avatar LFDM
Browse files

Joins ruby prompt files and adds ruby_prompt_info.

parent 7aa76616
# using the chruby plugin will override this with a real implementation
function chruby_prompt_info() {
return 1
}
# using the rbenv plugin will override this with a real implementation
function rbenv_prompt_info() {
return 1
}
# get the name of the ruby version
# get the name of the rvm ruby version
function rvm_prompt_info() {
[ -f $HOME/.rvm/bin/rvm-prompt ] || return 1
local rvm_prompt
......@@ -6,3 +6,17 @@ function rvm_prompt_info() {
[[ "${rvm_prompt}x" == "x" ]] && return 1
echo "${ZSH_THEME_RVM_PROMPT_PREFIX:=(}${rvm_prompt}${ZSH_THEME_RVM_PROMPT_SUFFIX:=)}"
}
# using the rbenv plugin will override this with a real implementation
function rbenv_prompt_info() {
return 1
}
# using the chruby plugin will override this with a real implementation
function chruby_prompt_info() {
return 1
}
function ruby_prompt_info() {
echo $(rvm_prompt_info || rbenv_prompt_info || chruby_prompt_info)
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment