Add rbfu support.
Prompts can now display the currently active Ruby version set by rbfu, a tool similar to RVM and rbenv.
This commit is contained in:
@@ -27,6 +27,9 @@ VIRTUALENV_THEME_PROMPT_SUFFIX='|'
|
||||
RBENV_THEME_PROMPT_PREFIX=' |'
|
||||
RBENV_THEME_PROMPT_SUFFIX='|'
|
||||
|
||||
RBFU_THEME_PROMPT_PREFIX=' |'
|
||||
RBFU_THEME_PROMPT_SUFFIX='|'
|
||||
|
||||
function scm {
|
||||
if [[ -d .git ]]; then SCM=$SCM_GIT
|
||||
elif [[ -n "$(git symbolic-ref HEAD 2> /dev/null)" ]]; then SCM=$SCM_GIT
|
||||
@@ -123,6 +126,12 @@ function rbenv_version_prompt {
|
||||
fi
|
||||
}
|
||||
|
||||
function rbfu_version_prompt {
|
||||
if [[ $RBFU_RUBY_VERSION ]]; then
|
||||
echo -e "${RBFU_THEME_PROMPT_PREFIX}${RBFU_RUBY_VERSION}${RBFU_THEME_PROMPT_SUFFIX}"
|
||||
fi
|
||||
}
|
||||
|
||||
function virtualenv_prompt {
|
||||
if which virtualenv &> /dev/null; then
|
||||
virtualenv=$([ ! -z "$VIRTUAL_ENV" ] && echo "`basename $VIRTUAL_ENV`") || return
|
||||
|
||||
Reference in New Issue
Block a user