mirror of
https://github.com/ohmybash/oh-my-bash.git
synced 2024-05-11 05:55:37 +00:00
themes/{mairan,zork}: Define variable in the place where it is used
This commit is contained in:
@@ -89,6 +89,7 @@ function chroot {
|
||||
# show virtualenvwrapper
|
||||
function my_ve {
|
||||
if [[ $VIRTUAL_ENV ]]; then
|
||||
local ve=$(basename "$VIRTUAL_ENV")
|
||||
local my_ps_ve=$_omb_prompt_bold_purple$ve$_omb_prompt_normal
|
||||
echo "($my_ps_ve)"
|
||||
fi
|
||||
@@ -103,10 +104,6 @@ function _omb_theme_PROMPT_COMMAND {
|
||||
local my_ps_user="$BOLD$GREEN\u${_omb_prompt_normal}"
|
||||
local my_ps_root="${_omb_prompt_bold_brown}\u${_omb_prompt_normal}"
|
||||
|
||||
if [[ $VIRTUAL_ENV ]]; then
|
||||
local ve=$(basename "$VIRTUAL_ENV")
|
||||
fi
|
||||
|
||||
# nice prompt
|
||||
case $(id -u) in
|
||||
0) PS1="\n${TITLEBAR}${BRACKET_COLOR}┌─${_omb_prompt_normal}$(my_ve)$(chroot)[$my_ps_root][$my_ps_host_root]$(modern_scm_prompt)$(__my_rvm_ruby_version)[${_omb_prompt_green}\w${_omb_prompt_normal}]$(is_vim_shell)${BRACKET_COLOR}
|
||||
|
||||
@@ -56,6 +56,7 @@ function chroot {
|
||||
# show virtualenvwrapper
|
||||
function my_ve {
|
||||
if [[ $VIRTUAL_ENV ]]; then
|
||||
local ve=$(basename "$VIRTUAL_ENV")
|
||||
local my_ps_ve=$_omb_prompt_bold_purple$ve$_omb_prompt_normal
|
||||
echo "($my_ps_ve)"
|
||||
fi
|
||||
@@ -70,10 +71,6 @@ function _omb_theme_PROMPT_COMMAND {
|
||||
local my_ps_user="${_omb_prompt_bold_green}\u${_omb_prompt_normal}"
|
||||
local my_ps_root="${_omb_prompt_bold_brown}\u${_omb_prompt_normal}"
|
||||
|
||||
if [[ $VIRTUAL_ENV ]]; then
|
||||
local ve=$(basename "$VIRTUAL_ENV")
|
||||
fi
|
||||
|
||||
# nice prompt
|
||||
case $(id -u) in
|
||||
0) PS1="${TITLEBAR}┌─$(my_ve)$(chroot)[$my_ps_root][$my_ps_host_root]$(modern_scm_prompt)$(__my_rvm_ruby_version)[${_omb_prompt_teal}\w${_omb_prompt_normal}]$(is_vim_shell)
|
||||
|
||||
Reference in New Issue
Block a user