From 2e8be86f2b750617d9fc29005c8fbd12c25f2780 Mon Sep 17 00:00:00 2001 From: Hendrik Mans Date: Tue, 24 Jan 2012 14:31:23 +0100 Subject: [PATCH] Introduce $(ruby_version_prompt), wrapping around rbfu, rbenv and RVM support. --- themes/base.theme.bash | 4 ++++ themes/envy/envy.theme.bash | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/themes/base.theme.bash b/themes/base.theme.bash index b763121..503fc57 100644 --- a/themes/base.theme.bash +++ b/themes/base.theme.bash @@ -132,6 +132,10 @@ function rbfu_version_prompt { fi } +function ruby_version_prompt { + echo -e "$(rbfu_version_prompt)$(rbenv_version_prompt)$(rvm_version_prompt)" +} + function virtualenv_prompt { if which virtualenv &> /dev/null; then virtualenv=$([ ! -z "$VIRTUAL_ENV" ] && echo "`basename $VIRTUAL_ENV`") || return diff --git a/themes/envy/envy.theme.bash b/themes/envy/envy.theme.bash index e9b7081..d2f6a00 100644 --- a/themes/envy/envy.theme.bash +++ b/themes/envy/envy.theme.bash @@ -10,7 +10,7 @@ GIT_THEME_PROMPT_PREFIX=" ${green}|" GIT_THEME_PROMPT_SUFFIX="${green}|" function prompt_command() { - PS1="\n${yellow}$(rbfu_version_prompt)$(rbenv_version_prompt)$(rvm_version_prompt) ${purple}\h ${reset_color}in ${green}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} " + PS1="\n${yellow}$(ruby_version_prompt) ${purple}\h ${reset_color}in ${green}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} " } PROMPT_COMMAND=prompt_command; -- 2.17.1