add virtual env in bira theme

The current virtual env is displayed in paranthesis at the end of the first
line (if available).
This commit is contained in:
n00k 2017-03-09 17:35:56 +01:00
parent b908feebcf
commit 6f80c39d3c

View File

@ -21,7 +21,15 @@ else
fi fi
local git_branch='$(git_prompt_info)%{$reset_color%}' local git_branch='$(git_prompt_info)%{$reset_color%}'
PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch} VIRTUAL_ENV_DISABLE_PROMPT="1"
function get_virtualenv() {
if [ -n "${VIRTUAL_ENV}" ]; then
echo "(`basename ${VIRTUAL_ENV}`)"
fi
}
local virtual_env='$(get_virtualenv)'
PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch} ${virtual_env}
╰─%B${user_symbol}%b " ╰─%B${user_symbol}%b "
RPS1="%B${return_code}%b" RPS1="%B${return_code}%b"