From af96da5d11bccb16923694fd68cda557200882db Mon Sep 17 00:00:00 2001 From: Yuhao Wu Date: Thu, 7 Jul 2016 17:13:00 +0900 Subject: [PATCH] Fix bug: themes break global $PROMPT_COMMAND variable Safely append functions to $PROMPT_COMMAND instead of setting it. --- themes/axin/axin.theme.bash | 2 +- themes/bakke/bakke.theme.bash | 2 +- themes/base.theme.bash | 9 +++++++++ themes/binaryanomaly/binaryanomaly.theme.bash | 2 +- themes/bobby-python/bobby-python.theme.bash | 2 +- themes/bobby/bobby.theme.bash | 2 +- themes/brunton/brunton.theme.bash | 2 +- themes/candy/candy.theme.bash | 2 +- themes/clean/clean.theme.bash | 2 +- themes/cooperkid/cooperkid.theme.bash | 2 +- themes/cupcake/cupcake.theme.bash | 2 +- themes/demula/demula.theme.bash | 2 +- themes/doubletime/doubletime.theme.bash | 2 +- .../doubletime_multiline/doubletime_multiline.theme.bash | 2 +- .../doubletime_multiline_pyonly.theme.bash | 2 +- themes/dulcie/dulcie.theme.bash | 2 +- themes/duru/duru.theme.bash | 2 +- themes/emperor/emperor.theme.bash | 2 +- themes/envy/envy.theme.bash | 2 +- themes/gallifrey/gallifrey.theme.bash | 2 +- themes/hawaii50/hawaii50.theme.bash | 2 +- themes/iterate/iterate.theme.bash | 2 +- themes/luan/luan.theme.bash | 2 +- themes/mairan/mairan.theme.bash | 2 +- themes/mbriggs/mbriggs.theme.bash | 2 +- themes/minimal/minimal.theme.bash | 2 +- themes/modern-t/modern-t.theme.bash | 2 +- themes/modern/modern.theme.bash | 2 +- themes/morris/morris.theme.bash | 2 +- themes/n0qorg/n0qorg.theme.bash | 2 +- themes/nwinkler/nwinkler.theme.bash | 2 +- .../nwinkler_random_colors.theme.bash | 2 +- themes/pete/pete.theme.bash | 2 +- .../powerline-multiline/powerline-multiline.theme.bash | 2 +- themes/powerline-naked/powerline-naked.theme.bash | 2 +- themes/powerline-plain/powerline-plain.theme.bash | 2 +- themes/powerline/powerline.theme.bash | 2 +- themes/primer/primer.theme.bash | 2 +- themes/pro/pro.theme.bash | 2 +- themes/pure/pure.theme.bash | 2 +- themes/rainbowbrite/rainbowbrite.theme.bash | 2 +- themes/rana/rana.theme.bash | 2 +- themes/rjorgenson/rjorgenson.theme.bash | 2 +- themes/roderik/roderik.theme.bash | 2 +- themes/sexy/sexy.theme.bash | 2 +- themes/simple/simple.theme.bash | 2 +- themes/sirup/sirup.theme.bash | 2 +- themes/slick/slick.theme.bash | 2 +- themes/standard/standard.theme.bash | 2 +- themes/tonka/tonka.theme.bash | 2 +- themes/tonotdo/tonotdo.theme.bash | 2 +- themes/tylenol/tylenol.theme.bash | 2 +- themes/zitron/zitron.theme.bash | 2 +- themes/zork/zork.theme.bash | 2 +- 54 files changed, 62 insertions(+), 53 deletions(-) diff --git a/themes/axin/axin.theme.bash b/themes/axin/axin.theme.bash index 0b95b531..32684fbc 100644 --- a/themes/axin/axin.theme.bash +++ b/themes/axin/axin.theme.bash @@ -35,4 +35,4 @@ function prompt_command() { PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]@ \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\[$SCM_THEME_PROMPT_PREFIX\]${white}\t \[$PURPLE\]\$(scm_prompt_info) \n\$ \[$RESET\]" } -PROMPT_COMMAND=prompt_command +safe_append_prompt_command prompt_command diff --git a/themes/bakke/bakke.theme.bash b/themes/bakke/bakke.theme.bash index 3663bc17..57585984 100644 --- a/themes/bakke/bakke.theme.bash +++ b/themes/bakke/bakke.theme.bash @@ -19,4 +19,4 @@ function prompt_command() { PS1="\n${cyan}\h: ${reset_color} ${yellow}\w ${green}$(scm_prompt_info)\n${reset_color}→ " } -PROMPT_COMMAND=prompt_command; +safe_append_prompt_command prompt_command diff --git a/themes/base.theme.bash b/themes/base.theme.bash index d961b10d..50225023 100644 --- a/themes/base.theme.bash +++ b/themes/base.theme.bash @@ -403,3 +403,12 @@ function aws_profile { echo -e "default" fi } + +function safe_append_prompt_command { + if [[ -n $1 ]] ; then + case $PROMPT_COMMAND in + *$1*) ;; + *) PROMPT_COMMAND="$1;$PROMPT_COMMAND";; + esac + fi +} \ No newline at end of file diff --git a/themes/binaryanomaly/binaryanomaly.theme.bash b/themes/binaryanomaly/binaryanomaly.theme.bash index 58748f1d..38afe72b 100644 --- a/themes/binaryanomaly/binaryanomaly.theme.bash +++ b/themes/binaryanomaly/binaryanomaly.theme.bash @@ -102,4 +102,4 @@ SCM_GIT_CHAR="${green}±${light_grey}" SCM_SVN_CHAR="${bold_cyan}⑆${light_grey}" SCM_HG_CHAR="${bold_red}☿${light_grey}" -PROMPT_COMMAND=prompt_command; +safe_append_prompt_command prompt_command diff --git a/themes/bobby-python/bobby-python.theme.bash b/themes/bobby-python/bobby-python.theme.bash index 962ebca7..e2e5a97f 100644 --- a/themes/bobby-python/bobby-python.theme.bash +++ b/themes/bobby-python/bobby-python.theme.bash @@ -16,4 +16,4 @@ function prompt_command() { PS1="\n${yellow}$(python_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; +safe_append_prompt_command prompt_command diff --git a/themes/bobby/bobby.theme.bash b/themes/bobby/bobby.theme.bash index e0011759..f014e771 100644 --- a/themes/bobby/bobby.theme.bash +++ b/themes/bobby/bobby.theme.bash @@ -17,4 +17,4 @@ function prompt_command() { PS1="\n$(battery_char) $(clock_char) ${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; +safe_append_prompt_command prompt_command diff --git a/themes/brunton/brunton.theme.bash b/themes/brunton/brunton.theme.bash index 839ae674..b085725a 100644 --- a/themes/brunton/brunton.theme.bash +++ b/themes/brunton/brunton.theme.bash @@ -31,4 +31,4 @@ ${white}>${normal} " } -PROMPT_COMMAND=prompt +safe_append_prompt_command prompt diff --git a/themes/candy/candy.theme.bash b/themes/candy/candy.theme.bash index 77f8ff41..fe3c2dff 100644 --- a/themes/candy/candy.theme.bash +++ b/themes/candy/candy.theme.bash @@ -3,4 +3,4 @@ function prompt_command() { PS1="${green}\u@\h ${blue}\T ${reset_color}${white}\w${reset_color}$(scm_prompt_info)${blue} →${bold_blue} ${reset_color} "; } -PROMPT_COMMAND=prompt_command; +safe_append_prompt_command prompt_command diff --git a/themes/clean/clean.theme.bash b/themes/clean/clean.theme.bash index 9998d65e..b4cd7b58 100644 --- a/themes/clean/clean.theme.bash +++ b/themes/clean/clean.theme.bash @@ -17,4 +17,4 @@ function prompt_command() { RPROMPT='[\t]' } -PROMPT_COMMAND=prompt_command; +safe_append_prompt_command prompt_command diff --git a/themes/cooperkid/cooperkid.theme.bash b/themes/cooperkid/cooperkid.theme.bash index ff4df68e..1ffb95aa 100644 --- a/themes/cooperkid/cooperkid.theme.bash +++ b/themes/cooperkid/cooperkid.theme.bash @@ -36,4 +36,4 @@ function prompt() { PS1="\n${user_host}${prompt_symbol}${ruby} ${git_branch} ${return_status}\n${prompt_char}" } -PROMPT_COMMAND=prompt +safe_append_prompt_command prompt diff --git a/themes/cupcake/cupcake.theme.bash b/themes/cupcake/cupcake.theme.bash index 3f1ca055..889f3e68 100644 --- a/themes/cupcake/cupcake.theme.bash +++ b/themes/cupcake/cupcake.theme.bash @@ -76,4 +76,4 @@ function prompt_command() { } # Runs prompt (this bypasses bash_it $PROMPT setting) -PROMPT_COMMAND=prompt_command +safe_append_prompt_command prompt_command diff --git a/themes/demula/demula.theme.bash b/themes/demula/demula.theme.bash index 15faeded..ed03a708 100644 --- a/themes/demula/demula.theme.bash +++ b/themes/demula/demula.theme.bash @@ -126,5 +126,5 @@ ${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}" } # Runs prompt (this bypasses bash_it $PROMPT setting) -PROMPT_COMMAND=prompt +safe_append_prompt_command prompt diff --git a/themes/doubletime/doubletime.theme.bash b/themes/doubletime/doubletime.theme.bash index 87ced7ed..6146b215 100644 --- a/themes/doubletime/doubletime.theme.bash +++ b/themes/doubletime/doubletime.theme.bash @@ -56,7 +56,7 @@ $(doubletime_scm_prompt)$reset_color $ " PS4='+ ' } -PROMPT_COMMAND=prompt_setter +safe_append_prompt_command prompt_setter git_prompt_status() { local git_status_output diff --git a/themes/doubletime_multiline/doubletime_multiline.theme.bash b/themes/doubletime_multiline/doubletime_multiline.theme.bash index d431657d..759917c2 100644 --- a/themes/doubletime_multiline/doubletime_multiline.theme.bash +++ b/themes/doubletime_multiline/doubletime_multiline.theme.bash @@ -21,4 +21,4 @@ $(doubletime_scm_prompt)$reset_color $ " PS4='+ ' } -PROMPT_COMMAND=prompt_setter +safe_append_prompt_command prompt_setter diff --git a/themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.bash b/themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.bash index 5073507f..a77ce55f 100644 --- a/themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.bash +++ b/themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.bash @@ -21,4 +21,4 @@ $(doubletime_scm_prompt)$reset_color $ " PS4='+ ' } -PROMPT_COMMAND=prompt_setter +safe_append_prompt_command prompt_setter diff --git a/themes/dulcie/dulcie.theme.bash b/themes/dulcie/dulcie.theme.bash index 12cc4545..a83b62fb 100644 --- a/themes/dulcie/dulcie.theme.bash +++ b/themes/dulcie/dulcie.theme.bash @@ -95,4 +95,4 @@ dulcie_prompt() { PS1="${PS1}${DULCIE_PROMPTCHAR} " } -PROMPT_COMMAND=dulcie_prompt +safe_append_prompt_command dulcie_prompt diff --git a/themes/duru/duru.theme.bash b/themes/duru/duru.theme.bash index f1b47e92..69284100 100644 --- a/themes/duru/duru.theme.bash +++ b/themes/duru/duru.theme.bash @@ -21,4 +21,4 @@ prompt() { PS1="${yellow}# ${reset_color}$(last_two_dirs)$(scm_prompt_info)${reset_color}$(venv)${reset_color} ${cyan}\n> ${reset_color}" } -PROMPT_COMMAND=prompt +safe_append_prompt_command prompt diff --git a/themes/emperor/emperor.theme.bash b/themes/emperor/emperor.theme.bash index 8d9313b2..2f365f31 100644 --- a/themes/emperor/emperor.theme.bash +++ b/themes/emperor/emperor.theme.bash @@ -31,4 +31,4 @@ function prompt_command() { PS1="\n$(get_hour_color)$(date +%H) ${purple}\h ${reset_color}in ${prompt_color}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} " } -PROMPT_COMMAND=prompt_command; +safe_append_prompt_command prompt_command diff --git a/themes/envy/envy.theme.bash b/themes/envy/envy.theme.bash index a0b8a993..277e3751 100644 --- a/themes/envy/envy.theme.bash +++ b/themes/envy/envy.theme.bash @@ -13,4 +13,4 @@ function prompt_command() { 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; +safe_append_prompt_command prompt_command diff --git a/themes/gallifrey/gallifrey.theme.bash b/themes/gallifrey/gallifrey.theme.bash index a601db12..ddb89778 100644 --- a/themes/gallifrey/gallifrey.theme.bash +++ b/themes/gallifrey/gallifrey.theme.bash @@ -38,4 +38,4 @@ pure_prompt() { esac } -PROMPT_COMMAND=pure_prompt; +safe_append_prompt_command pure_prompt diff --git a/themes/hawaii50/hawaii50.theme.bash b/themes/hawaii50/hawaii50.theme.bash index 21b3ab4f..eaa6b1eb 100644 --- a/themes/hawaii50/hawaii50.theme.bash +++ b/themes/hawaii50/hawaii50.theme.bash @@ -197,4 +197,4 @@ function prompt() { PS4='+ ' } -PROMPT_COMMAND=prompt +safe_append_prompt_command prompt diff --git a/themes/iterate/iterate.theme.bash b/themes/iterate/iterate.theme.bash index 7b375f44..2031b7fc 100644 --- a/themes/iterate/iterate.theme.bash +++ b/themes/iterate/iterate.theme.bash @@ -56,4 +56,4 @@ function prompt_command() { PS1="${new_PS1}${green}${wrap_char}→${reset_color} " } -PROMPT_COMMAND=prompt_command; +safe_append_prompt_command prompt_command diff --git a/themes/luan/luan.theme.bash b/themes/luan/luan.theme.bash index eccef2a0..cb122e50 100644 --- a/themes/luan/luan.theme.bash +++ b/themes/luan/luan.theme.bash @@ -26,4 +26,4 @@ function prompt_command() { $arrow $prompt" } -PROMPT_COMMAND=prompt_command; +safe_append_prompt_command prompt_command diff --git a/themes/mairan/mairan.theme.bash b/themes/mairan/mairan.theme.bash index 3451d3cb..5c5dfef1 100644 --- a/themes/mairan/mairan.theme.bash +++ b/themes/mairan/mairan.theme.bash @@ -127,4 +127,4 @@ PS2="└─▪ " -PROMPT_COMMAND=prompt +safe_append_prompt_command prompt diff --git a/themes/mbriggs/mbriggs.theme.bash b/themes/mbriggs/mbriggs.theme.bash index 674085b6..169f8d7c 100644 --- a/themes/mbriggs/mbriggs.theme.bash +++ b/themes/mbriggs/mbriggs.theme.bash @@ -31,4 +31,4 @@ function prompt() { PS1="\n${n_commands} ${user_host} ${prompt_symbol} ${ruby} ${open}${current_path}${git_branch}${close}${return_status}\n${prompt_char}" } -PROMPT_COMMAND=prompt \ No newline at end of file +safe_append_prompt_command prompt \ No newline at end of file diff --git a/themes/minimal/minimal.theme.bash b/themes/minimal/minimal.theme.bash index 76cb24d5..72fb2200 100644 --- a/themes/minimal/minimal.theme.bash +++ b/themes/minimal/minimal.theme.bash @@ -9,4 +9,4 @@ prompt() { PS1="$(scm_prompt_info)${reset_color} ${cyan}\W${reset_color} " } -PROMPT_COMMAND=prompt +safe_append_prompt_command prompt diff --git a/themes/modern-t/modern-t.theme.bash b/themes/modern-t/modern-t.theme.bash index 12e5b041..da5f9446 100644 --- a/themes/modern-t/modern-t.theme.bash +++ b/themes/modern-t/modern-t.theme.bash @@ -53,4 +53,4 @@ PS2="└─▪ " -PROMPT_COMMAND=prompt +safe_append_prompt_command prompt diff --git a/themes/modern/modern.theme.bash b/themes/modern/modern.theme.bash index 32c7cabb..583764e2 100644 --- a/themes/modern/modern.theme.bash +++ b/themes/modern/modern.theme.bash @@ -53,4 +53,4 @@ PS2="└─▪ " -PROMPT_COMMAND=prompt +safe_append_prompt_command prompt diff --git a/themes/morris/morris.theme.bash b/themes/morris/morris.theme.bash index da51e55a..d6b0258d 100644 --- a/themes/morris/morris.theme.bash +++ b/themes/morris/morris.theme.bash @@ -25,4 +25,4 @@ SCM_THEME_PROMPT_PREFIX="${green}(" SCM_THEME_PROMPT_SUFFIX="${green})${reset_color}" -PROMPT_COMMAND=prompt_command; +safe_append_prompt_command prompt_command diff --git a/themes/n0qorg/n0qorg.theme.bash b/themes/n0qorg/n0qorg.theme.bash index dd39fafd..291e4518 100644 --- a/themes/n0qorg/n0qorg.theme.bash +++ b/themes/n0qorg/n0qorg.theme.bash @@ -9,7 +9,7 @@ function prompt_command() { PS1="${bold_blue}[$(hostname)]${normal} \w${normal} ${bold_white}[$(git_prompt_info)]${normal}» " } -PROMPT_COMMAND=prompt_command; +safe_append_prompt_command prompt_command ## git-theme # feel free to change git chars. diff --git a/themes/nwinkler/nwinkler.theme.bash b/themes/nwinkler/nwinkler.theme.bash index b8bcc226..d1d3f503 100644 --- a/themes/nwinkler/nwinkler.theme.bash +++ b/themes/nwinkler/nwinkler.theme.bash @@ -37,7 +37,7 @@ prompt_setter() { PS4='+ ' } -PROMPT_COMMAND=prompt_setter +safe_append_prompt_command prompt_setter SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" diff --git a/themes/nwinkler_random_colors/nwinkler_random_colors.theme.bash b/themes/nwinkler_random_colors/nwinkler_random_colors.theme.bash index 23634276..20da931f 100644 --- a/themes/nwinkler_random_colors/nwinkler_random_colors.theme.bash +++ b/themes/nwinkler_random_colors/nwinkler_random_colors.theme.bash @@ -102,7 +102,7 @@ prompt_setter() { PS4='+ ' } -PROMPT_COMMAND=prompt_setter +safe_append_prompt_command prompt_setter SCM_THEME_PROMPT_DIRTY=" ${bold_red}✗${normal}" SCM_THEME_PROMPT_CLEAN=" ${bold_green}✓${normal}" diff --git a/themes/pete/pete.theme.bash b/themes/pete/pete.theme.bash index 7968e53b..b573cb81 100644 --- a/themes/pete/pete.theme.bash +++ b/themes/pete/pete.theme.bash @@ -10,7 +10,7 @@ prompt_setter() { PS4='+ ' } -PROMPT_COMMAND=prompt_setter +safe_append_prompt_command prompt_setter SCM_THEME_PROMPT_DIRTY=" ✗" SCM_THEME_PROMPT_CLEAN=" ✓" diff --git a/themes/powerline-multiline/powerline-multiline.theme.bash b/themes/powerline-multiline/powerline-multiline.theme.bash index c4833756..604c022f 100644 --- a/themes/powerline-multiline/powerline-multiline.theme.bash +++ b/themes/powerline-multiline/powerline-multiline.theme.bash @@ -240,4 +240,4 @@ function __powerline_prompt_command { SEGMENTS_AT_LEFT SEGMENTS_AT_RIGHT } -PROMPT_COMMAND=__powerline_prompt_command +safe_append_prompt_command __powerline_prompt_command diff --git a/themes/powerline-naked/powerline-naked.theme.bash b/themes/powerline-naked/powerline-naked.theme.bash index a599aa59..f1f7b40a 100644 --- a/themes/powerline-naked/powerline-naked.theme.bash +++ b/themes/powerline-naked/powerline-naked.theme.bash @@ -106,5 +106,5 @@ function powerline_prompt_command() { PS1="${SHELL_PROMPT}${VIRTUALENV_PROMPT}${SCM_PROMPT}${CWD_PROMPT}${LAST_STATUS_PROMPT} " } -PROMPT_COMMAND=powerline_prompt_command +safe_append_prompt_command powerline_prompt_command diff --git a/themes/powerline-plain/powerline-plain.theme.bash b/themes/powerline-plain/powerline-plain.theme.bash index 5c3ca826..9393d742 100644 --- a/themes/powerline-plain/powerline-plain.theme.bash +++ b/themes/powerline-plain/powerline-plain.theme.bash @@ -120,5 +120,5 @@ function powerline_prompt_command() { PS1="${SHELL_PROMPT}${GEMSET_PROMPT}${VIRTUALENV_PROMPT}${SCM_PROMPT}${CWD_PROMPT}${LAST_STATUS_PROMPT} " } -PROMPT_COMMAND=powerline_prompt_command +safe_append_prompt_command powerline_prompt_command diff --git a/themes/powerline/powerline.theme.bash b/themes/powerline/powerline.theme.bash index f486eedf..967a412c 100644 --- a/themes/powerline/powerline.theme.bash +++ b/themes/powerline/powerline.theme.bash @@ -129,5 +129,5 @@ function powerline_prompt_command() { PS1="${SHELL_PROMPT}${IN_VIM_PROMPT}${VIRTUALENV_PROMPT}${SCM_PROMPT}${CWD_PROMPT}${LAST_STATUS_PROMPT} " } -PROMPT_COMMAND=powerline_prompt_command +safe_append_prompt_command powerline_prompt_command diff --git a/themes/primer/primer.theme.bash b/themes/primer/primer.theme.bash index 0b01088e..cc5ba536 100644 --- a/themes/primer/primer.theme.bash +++ b/themes/primer/primer.theme.bash @@ -5,4 +5,4 @@ function prompt_command() { PS1="${blue}\T ${reset_color}${white}\w${reset_color}$(scm_prompt_info)${blue} →${bold_blue} ${reset_color} "; } -PROMPT_COMMAND=prompt_command; \ No newline at end of file +safe_append_prompt_command prompt_command \ No newline at end of file diff --git a/themes/pro/pro.theme.bash b/themes/pro/pro.theme.bash index 6ac697bf..1c7de29a 100644 --- a/themes/pro/pro.theme.bash +++ b/themes/pro/pro.theme.bash @@ -19,4 +19,4 @@ function prompt() { PS1="\h: \W $(scm_prompt_info)${reset_color} $ " } -PROMPT_COMMAND=prompt +safe_append_prompt_command prompt diff --git a/themes/pure/pure.theme.bash b/themes/pure/pure.theme.bash index 9b145cc4..b75d3f8f 100644 --- a/themes/pure/pure.theme.bash +++ b/themes/pure/pure.theme.bash @@ -40,4 +40,4 @@ pure_prompt() { esac } -PROMPT_COMMAND=pure_prompt; +safe_append_prompt_command pure_prompt diff --git a/themes/rainbowbrite/rainbowbrite.theme.bash b/themes/rainbowbrite/rainbowbrite.theme.bash index 3d92db7f..63c64b72 100644 --- a/themes/rainbowbrite/rainbowbrite.theme.bash +++ b/themes/rainbowbrite/rainbowbrite.theme.bash @@ -18,7 +18,7 @@ prompt_setter() { PS4='+ ' } -PROMPT_COMMAND=prompt_setter +safe_append_prompt_command prompt_setter SCM_NONE_CHAR='·' SCM_THEME_PROMPT_DIRTY=" ${red}✗" diff --git a/themes/rana/rana.theme.bash b/themes/rana/rana.theme.bash index d29e52ab..c1122429 100644 --- a/themes/rana/rana.theme.bash +++ b/themes/rana/rana.theme.bash @@ -211,4 +211,4 @@ ${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}" } # Runs prompt (this bypasses bash_it $PROMPT setting) -PROMPT_COMMAND=prompt +safe_append_prompt_command prompt diff --git a/themes/rjorgenson/rjorgenson.theme.bash b/themes/rjorgenson/rjorgenson.theme.bash index 2ef151ae..e866f0ea 100644 --- a/themes/rjorgenson/rjorgenson.theme.bash +++ b/themes/rjorgenson/rjorgenson.theme.bash @@ -97,4 +97,4 @@ PS2="└─$(my_prompt_char)" -PROMPT_COMMAND=prompt +safe_append_prompt_command prompt diff --git a/themes/roderik/roderik.theme.bash b/themes/roderik/roderik.theme.bash index 1c71ab44..2f32e4d1 100644 --- a/themes/roderik/roderik.theme.bash +++ b/themes/roderik/roderik.theme.bash @@ -14,4 +14,4 @@ function prompt_command() { fi } -PROMPT_COMMAND=prompt_command; +safe_append_prompt_command prompt_command diff --git a/themes/sexy/sexy.theme.bash b/themes/sexy/sexy.theme.bash index b7cbbf03..60e00ec7 100644 --- a/themes/sexy/sexy.theme.bash +++ b/themes/sexy/sexy.theme.bash @@ -43,4 +43,4 @@ function prompt_command() { PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]at \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$WHITE\]\n\$ \[$RESET\]" } -PROMPT_COMMAND=prompt_command +safe_append_prompt_command prompt_command diff --git a/themes/simple/simple.theme.bash b/themes/simple/simple.theme.bash index 8b897ddc..f4d152fb 100644 --- a/themes/simple/simple.theme.bash +++ b/themes/simple/simple.theme.bash @@ -22,4 +22,4 @@ SCM_THEME_PROMPT_CLEAN=" ✓" SCM_THEME_PROMPT_PREFIX="(" SCM_THEME_PROMPT_SUFFIX=")" -PROMPT_COMMAND=prompt_command; +safe_append_prompt_command prompt_command diff --git a/themes/sirup/sirup.theme.bash b/themes/sirup/sirup.theme.bash index 146cc356..38fcab41 100644 --- a/themes/sirup/sirup.theme.bash +++ b/themes/sirup/sirup.theme.bash @@ -19,4 +19,4 @@ function prompt_command() { PS1="$blue\W/$bold_blue$(rvm_version_prompt)$bold_green$(__git_ps1 " (%s)") ${normal}$ " } -PROMPT_COMMAND=prompt_command; +safe_append_prompt_command prompt_command diff --git a/themes/slick/slick.theme.bash b/themes/slick/slick.theme.bash index bccc1666..aafdc25d 100644 --- a/themes/slick/slick.theme.bash +++ b/themes/slick/slick.theme.bash @@ -83,4 +83,4 @@ PS2="> " -PROMPT_COMMAND=prompt +safe_append_prompt_command prompt diff --git a/themes/standard/standard.theme.bash b/themes/standard/standard.theme.bash index 87402c73..561a97cb 100644 --- a/themes/standard/standard.theme.bash +++ b/themes/standard/standard.theme.bash @@ -21,4 +21,4 @@ function prompt_command() { PROMPT='${green}\u${normal}@${green}\h${normal}:${blue}\w${normal}${red}$(prompt_char)$(git_prompt_info)${normal}\$ ' } -PROMPT_COMMAND=prompt_command; +safe_append_prompt_command prompt_command diff --git a/themes/tonka/tonka.theme.bash b/themes/tonka/tonka.theme.bash index 2b28c968..53fbd64c 100644 --- a/themes/tonka/tonka.theme.bash +++ b/themes/tonka/tonka.theme.bash @@ -30,7 +30,7 @@ PS2="$LIGHT_BLUE-$YELLOW-$YELLOW-$NO_COLOUR " } -PROMPT_COMMAND=prompt_setter +safe_append_prompt_command prompt_setter export PS3=">> " diff --git a/themes/tonotdo/tonotdo.theme.bash b/themes/tonotdo/tonotdo.theme.bash index a1e18ba6..347e586b 100644 --- a/themes/tonotdo/tonotdo.theme.bash +++ b/themes/tonotdo/tonotdo.theme.bash @@ -10,4 +10,4 @@ function prompt_command() { PS1="${yellow}\u${normal}${cyan}@\h${normal}${purple} ${normal}${green}\w${normal}$(scm_prompt_info)> " } -PROMPT_COMMAND=prompt_command +safe_append_prompt_command prompt_command diff --git a/themes/tylenol/tylenol.theme.bash b/themes/tylenol/tylenol.theme.bash index 4c88e217..a48dceb4 100644 --- a/themes/tylenol/tylenol.theme.bash +++ b/themes/tylenol/tylenol.theme.bash @@ -17,4 +17,4 @@ function prompt_command() { PS1="\n${green}$(virtualenv_prompt)${red}$(ruby_version_prompt) ${reset_color}\h ${orange}in ${reset_color}\w\n${yellow}$(scm_char)$(scm_prompt_info) ${yellow}→${white} " } -PROMPT_COMMAND=prompt_command; +safe_append_prompt_command prompt_command diff --git a/themes/zitron/zitron.theme.bash b/themes/zitron/zitron.theme.bash index 7737d070..56b7bfa6 100644 --- a/themes/zitron/zitron.theme.bash +++ b/themes/zitron/zitron.theme.bash @@ -21,4 +21,4 @@ function prompt_command() { PS1="${no_color}\u:$(hostname)${normal}:${bold_yellow}\W/${normal} $(git_prompt_info)${reset_color}$ " } -PROMPT_COMMAND=prompt_command; +safe_append_prompt_command prompt_command diff --git a/themes/zork/zork.theme.bash b/themes/zork/zork.theme.bash index c022a408..75bc17d6 100644 --- a/themes/zork/zork.theme.bash +++ b/themes/zork/zork.theme.bash @@ -94,4 +94,4 @@ PS2="└─▪ " -PROMPT_COMMAND=prompt +safe_append_prompt_command prompt