diff --git a/lib/utils.sh b/lib/utils.sh index 9435d6c..0e1ec98 100644 --- a/lib/utils.sh +++ b/lib/utils.sh @@ -239,3 +239,27 @@ pushover () { -F "message=${MESSAGE}" \ "${PUSHOVERURL}" > /dev/null 2>&1 } + +_omb_util_add_prompt_command() { + # Set OS dependent exact match regular expression + local prompt_re + if [[ $OSTYPE == darwin* ]]; then + # macOS + prompt_re='[[:<:]]'$1'[[:>:]]' + else + # Linux, FreeBSD, etc. + prompt_re='\<'$1'\>' + fi + + # See if we need to use the overriden version + if _omb_util_function_exists append_prompt_command_override; then + append_prompt_command_override "$1" + return + fi + + if [[ $PROMPT_COMMAND =~ $prompt_re ]]; then + return + else + PROMPT_COMMAND="$1${PROMPT_COMMAND:+;$PROMPT_COMMAND}" + fi +} diff --git a/themes/90210/90210.theme.sh b/themes/90210/90210.theme.sh index e683e0e..e1d26c8 100644 --- a/themes/90210/90210.theme.sh +++ b/themes/90210/90210.theme.sh @@ -14,4 +14,4 @@ function prompt_command(){ export PS1="\n${bold_black}[${blue}\@${bold_black}]-${bold_black}[${green}\u${yellow}@${green}\h${bold_black}]-${bold_black}[${purple}\w${bold_black}]-$(scm_prompt_info)\n${reset_color}\$ " } -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/axin/axin.theme.sh b/themes/axin/axin.theme.sh index edca238..8663453 100644 --- a/themes/axin/axin.theme.sh +++ b/themes/axin/axin.theme.sh @@ -39,4 +39,4 @@ function prompt_command() { THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"${white}"} -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/bakke/bakke.theme.sh b/themes/bakke/bakke.theme.sh index 1f75830..89d45a1 100644 --- a/themes/bakke/bakke.theme.sh +++ b/themes/bakke/bakke.theme.sh @@ -19,4 +19,4 @@ function prompt_command() { PS1="\n${cyan}\h: ${reset_color} ${yellow}\w ${green}$(scm_prompt_info)\n${reset_color}→ " } -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/base.theme.sh b/themes/base.theme.sh index 637faba..ad78374 100644 --- a/themes/base.theme.sh +++ b/themes/base.theme.sh @@ -584,30 +584,4 @@ function aws_profile { # Returns true if $1 is a shell function. _omb_util_defun_deprecate 20000 fn_exists _omb_util_function_exists - -function safe_append_prompt_command { - local prompt_re - - # Set OS dependent exact match regular expression - if [[ ${OSTYPE} == darwin* ]]; then - # macOS - prompt_re="[[:<:]]${1}[[:>:]]" - else - # Linux, FreeBSD, etc. - prompt_re="\<${1}\>" - fi - - # See if we need to use the overriden version - if _omb_util_function_exists append_prompt_command_override; then - append_prompt_command_override "$1" - return - fi - - if [[ ${PROMPT_COMMAND} =~ ${prompt_re} ]]; then - return - elif [[ -z ${PROMPT_COMMAND} ]]; then - PROMPT_COMMAND="${1}" - else - PROMPT_COMMAND="${1};${PROMPT_COMMAND}" - fi -} +_omb_util_defun_deprecate 20000 safe_append_prompt_command _omb_util_add_prompt_command diff --git a/themes/binaryanomaly/binaryanomaly.theme.sh b/themes/binaryanomaly/binaryanomaly.theme.sh index 4c580eb..3fb5877 100644 --- a/themes/binaryanomaly/binaryanomaly.theme.sh +++ b/themes/binaryanomaly/binaryanomaly.theme.sh @@ -98,4 +98,4 @@ SCM_GIT_CHAR="${green}±${light_grey}" SCM_SVN_CHAR="${bold_cyan}⑆${light_grey}" SCM_HG_CHAR="${bold_red}☿${light_grey}" -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/bobby-python/bobby-python.theme.sh b/themes/bobby-python/bobby-python.theme.sh index e66acb4..8b65c56 100644 --- a/themes/bobby-python/bobby-python.theme.sh +++ b/themes/bobby-python/bobby-python.theme.sh @@ -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} " } -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/bobby/bobby.theme.sh b/themes/bobby/bobby.theme.sh index 63883a6..f863f68 100644 --- a/themes/bobby/bobby.theme.sh +++ b/themes/bobby/bobby.theme.sh @@ -31,4 +31,4 @@ THEME_CLOCK_CHAR_COLOR=${THEME_CLOCK_CHAR_COLOR:-"$red"} THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$bold_cyan"} THEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-"%Y-%m-%d %H:%M:%S"} -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/brainy/brainy.theme.sh b/themes/brainy/brainy.theme.sh index 722db71..f8e8143 100644 --- a/themes/brainy/brainy.theme.sh +++ b/themes/brainy/brainy.theme.sh @@ -292,4 +292,4 @@ _brainy_prompt() { PS2="$(__brainy_ps2)" } -safe_append_prompt_command _brainy_prompt +_omb_util_add_prompt_command _brainy_prompt diff --git a/themes/brunton/brunton.theme.sh b/themes/brunton/brunton.theme.sh index baa0578..4aacf03 100644 --- a/themes/brunton/brunton.theme.sh +++ b/themes/brunton/brunton.theme.sh @@ -33,4 +33,4 @@ prompt() { THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$blue$background_white"} THEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-" %H:%M:%S"} -safe_append_prompt_command prompt +_omb_util_add_prompt_command prompt diff --git a/themes/candy/candy.theme.sh b/themes/candy/candy.theme.sh index f3f0abf..3adb363 100644 --- a/themes/candy/candy.theme.sh +++ b/themes/candy/candy.theme.sh @@ -7,4 +7,4 @@ function prompt_command() { THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$blue"} THEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-"%I:%M:%S"} -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/clean/clean.theme.sh b/themes/clean/clean.theme.sh index b4cd7b5..440e140 100644 --- a/themes/clean/clean.theme.sh +++ b/themes/clean/clean.theme.sh @@ -17,4 +17,4 @@ function prompt_command() { RPROMPT='[\t]' } -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/cooperkid/cooperkid.theme.sh b/themes/cooperkid/cooperkid.theme.sh index 40f8ba3..1d857f4 100644 --- a/themes/cooperkid/cooperkid.theme.sh +++ b/themes/cooperkid/cooperkid.theme.sh @@ -27,4 +27,4 @@ function prompt() { PS1="\n${user_host}${prompt_symbol}${ruby} ${git_branch} ${return_status}\n${prompt_char}" } -safe_append_prompt_command prompt +_omb_util_add_prompt_command prompt diff --git a/themes/cupcake/cupcake.theme.sh b/themes/cupcake/cupcake.theme.sh index a5b64b7..39db1b6 100644 --- a/themes/cupcake/cupcake.theme.sh +++ b/themes/cupcake/cupcake.theme.sh @@ -68,4 +68,4 @@ function prompt_command() { } # Runs prompt (this bypasses oh-my-bash $PROMPT setting) -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/demula/demula.theme.sh b/themes/demula/demula.theme.sh index ce79be7..dc69b2d 100644 --- a/themes/demula/demula.theme.sh +++ b/themes/demula/demula.theme.sh @@ -126,4 +126,4 @@ ${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}" } # Runs prompt (this bypasses oh-my-bash $PROMPT setting) -safe_append_prompt_command prompt +_omb_util_add_prompt_command prompt diff --git a/themes/doubletime/doubletime.theme.sh b/themes/doubletime/doubletime.theme.sh index 512a97d..d79f351 100644 --- a/themes/doubletime/doubletime.theme.sh +++ b/themes/doubletime/doubletime.theme.sh @@ -51,7 +51,7 @@ $(doubletime_scm_prompt)$reset_color $ " PS4='+ ' } -safe_append_prompt_command prompt_setter +_omb_util_add_prompt_command prompt_setter git_prompt_status() { local git_status_output diff --git a/themes/doubletime_multiline/doubletime_multiline.theme.sh b/themes/doubletime_multiline/doubletime_multiline.theme.sh index d826117..05789ff 100644 --- a/themes/doubletime_multiline/doubletime_multiline.theme.sh +++ b/themes/doubletime_multiline/doubletime_multiline.theme.sh @@ -15,4 +15,4 @@ $(doubletime_scm_prompt)$reset_color $ " PS4='+ ' } -safe_append_prompt_command prompt_setter +_omb_util_add_prompt_command prompt_setter diff --git a/themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.sh b/themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.sh index 59e178f..25cda1e 100644 --- a/themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.sh +++ b/themes/doubletime_multiline_pyonly/doubletime_multiline_pyonly.theme.sh @@ -15,4 +15,4 @@ $(doubletime_scm_prompt)$reset_color $ " PS4='+ ' } -safe_append_prompt_command prompt_setter +_omb_util_add_prompt_command prompt_setter diff --git a/themes/dulcie/dulcie.theme.sh b/themes/dulcie/dulcie.theme.sh index a83b62f..455c2c9 100644 --- a/themes/dulcie/dulcie.theme.sh +++ b/themes/dulcie/dulcie.theme.sh @@ -95,4 +95,4 @@ dulcie_prompt() { PS1="${PS1}${DULCIE_PROMPTCHAR} " } -safe_append_prompt_command dulcie_prompt +_omb_util_add_prompt_command dulcie_prompt diff --git a/themes/duru/duru.theme.sh b/themes/duru/duru.theme.sh index 6928410..b08a066 100644 --- a/themes/duru/duru.theme.sh +++ b/themes/duru/duru.theme.sh @@ -21,4 +21,4 @@ prompt() { PS1="${yellow}# ${reset_color}$(last_two_dirs)$(scm_prompt_info)${reset_color}$(venv)${reset_color} ${cyan}\n> ${reset_color}" } -safe_append_prompt_command prompt +_omb_util_add_prompt_command prompt diff --git a/themes/emperor/emperor.theme.sh b/themes/emperor/emperor.theme.sh index e3f2df8..ee5869c 100644 --- a/themes/emperor/emperor.theme.sh +++ b/themes/emperor/emperor.theme.sh @@ -39,4 +39,4 @@ function prompt_command() { THEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-"%H "} -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/envy/envy.theme.sh b/themes/envy/envy.theme.sh index cde9982..7b0ebef 100644 --- a/themes/envy/envy.theme.sh +++ b/themes/envy/envy.theme.sh @@ -13,4 +13,4 @@ function prompt_command() { PS1="\n${yellow}$(_omb_prompt_print_ruby_env) ${purple}\h ${reset_color}in ${green}\w\n${bold_cyan}$(scm_char)${green}$(scm_prompt_info) ${green}→${reset_color} " } -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/font/font.theme.sh b/themes/font/font.theme.sh index 85add5d..a0608a9 100644 --- a/themes/font/font.theme.sh +++ b/themes/font/font.theme.sh @@ -58,4 +58,4 @@ function prompt_command() { PS1="$(clock_prompt)$python_venv${hostname} ${bold_cyan}\W $(scm_prompt_char_info)${ret_status}→ ${normal}" } -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/gallifrey/gallifrey.theme.sh b/themes/gallifrey/gallifrey.theme.sh index ddb8977..75a1ba3 100644 --- a/themes/gallifrey/gallifrey.theme.sh +++ b/themes/gallifrey/gallifrey.theme.sh @@ -38,4 +38,4 @@ pure_prompt() { esac } -safe_append_prompt_command pure_prompt +_omb_util_add_prompt_command pure_prompt diff --git a/themes/garo/garo.theme.sh b/themes/garo/garo.theme.sh index e94ebab..974a414 100644 --- a/themes/garo/garo.theme.sh +++ b/themes/garo/garo.theme.sh @@ -52,4 +52,4 @@ function prompt_command() { PS1="$python_venv${hostname} ${bold_cyan}\w $(scm_prompt_char_info)${ret_status}→ ${normal}" } -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/hawaii50/hawaii50.theme.sh b/themes/hawaii50/hawaii50.theme.sh index 09d6a09..bf483d7 100644 --- a/themes/hawaii50/hawaii50.theme.sh +++ b/themes/hawaii50/hawaii50.theme.sh @@ -194,4 +194,4 @@ function prompt() { PS4='+ ' } -safe_append_prompt_command prompt +_omb_util_add_prompt_command prompt diff --git a/themes/iterate/iterate.theme.sh b/themes/iterate/iterate.theme.sh index 534adce..0f9eec2 100644 --- a/themes/iterate/iterate.theme.sh +++ b/themes/iterate/iterate.theme.sh @@ -48,4 +48,4 @@ function prompt_command() { PS1="${new_PS1}${green}${wrap_char}→${reset_color} " } -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/kitsune/kitsune.theme.sh b/themes/kitsune/kitsune.theme.sh index c339f54..d9679bf 100644 --- a/themes/kitsune/kitsune.theme.sh +++ b/themes/kitsune/kitsune.theme.sh @@ -35,4 +35,4 @@ SCM_THEME_PROMPT_PREFIX="${bold_cyan}(" SCM_THEME_PROMPT_SUFFIX="${bold_cyan})${reset_color}" -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/luan/luan.theme.sh b/themes/luan/luan.theme.sh index 9157506..a7e8def 100644 --- a/themes/luan/luan.theme.sh +++ b/themes/luan/luan.theme.sh @@ -30,4 +30,4 @@ function prompt_command() { THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$yellow"} THEME_CLOCK_FORMAT=${THEME_TIME_FORMAT:-"%I:%M:%S "} -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/mairan/mairan.theme.sh b/themes/mairan/mairan.theme.sh index 5c5dfef..2e0cc70 100644 --- a/themes/mairan/mairan.theme.sh +++ b/themes/mairan/mairan.theme.sh @@ -127,4 +127,4 @@ PS2="└─▪ " -safe_append_prompt_command prompt +_omb_util_add_prompt_command prompt diff --git a/themes/mbriggs/mbriggs.theme.sh b/themes/mbriggs/mbriggs.theme.sh index 6c833a5..eafcde2 100644 --- a/themes/mbriggs/mbriggs.theme.sh +++ b/themes/mbriggs/mbriggs.theme.sh @@ -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}" } -safe_append_prompt_command prompt \ No newline at end of file +_omb_util_add_prompt_command prompt \ No newline at end of file diff --git a/themes/minimal/minimal.theme.sh b/themes/minimal/minimal.theme.sh index 72fb220..396c42b 100644 --- a/themes/minimal/minimal.theme.sh +++ b/themes/minimal/minimal.theme.sh @@ -9,4 +9,4 @@ prompt() { PS1="$(scm_prompt_info)${reset_color} ${cyan}\W${reset_color} " } -safe_append_prompt_command prompt +_omb_util_add_prompt_command prompt diff --git a/themes/modern-t/modern-t.theme.sh b/themes/modern-t/modern-t.theme.sh index da5f944..b127727 100644 --- a/themes/modern-t/modern-t.theme.sh +++ b/themes/modern-t/modern-t.theme.sh @@ -53,4 +53,4 @@ PS2="└─▪ " -safe_append_prompt_command prompt +_omb_util_add_prompt_command prompt diff --git a/themes/modern/modern.theme.sh b/themes/modern/modern.theme.sh index 583764e..1323510 100644 --- a/themes/modern/modern.theme.sh +++ b/themes/modern/modern.theme.sh @@ -53,4 +53,4 @@ PS2="└─▪ " -safe_append_prompt_command prompt +_omb_util_add_prompt_command prompt diff --git a/themes/morris/morris.theme.sh b/themes/morris/morris.theme.sh index d6b0258..ae79091 100644 --- a/themes/morris/morris.theme.sh +++ b/themes/morris/morris.theme.sh @@ -25,4 +25,4 @@ SCM_THEME_PROMPT_PREFIX="${green}(" SCM_THEME_PROMPT_SUFFIX="${green})${reset_color}" -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/n0qorg/n0qorg.theme.sh b/themes/n0qorg/n0qorg.theme.sh index 291e451..bfa5018 100644 --- a/themes/n0qorg/n0qorg.theme.sh +++ b/themes/n0qorg/n0qorg.theme.sh @@ -9,7 +9,7 @@ function prompt_command() { PS1="${bold_blue}[$(hostname)]${normal} \w${normal} ${bold_white}[$(git_prompt_info)]${normal}» " } -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command ## git-theme # feel free to change git chars. diff --git a/themes/nwinkler/nwinkler.theme.sh b/themes/nwinkler/nwinkler.theme.sh index a032331..8f4219b 100644 --- a/themes/nwinkler/nwinkler.theme.sh +++ b/themes/nwinkler/nwinkler.theme.sh @@ -37,7 +37,7 @@ prompt_setter() { PS4='+ ' } -safe_append_prompt_command prompt_setter +_omb_util_add_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.sh b/themes/nwinkler_random_colors/nwinkler_random_colors.theme.sh index 9e0d177..6a7833f 100644 --- a/themes/nwinkler_random_colors/nwinkler_random_colors.theme.sh +++ b/themes/nwinkler_random_colors/nwinkler_random_colors.theme.sh @@ -104,7 +104,7 @@ prompt_setter() { PS4='+ ' } -safe_append_prompt_command prompt_setter +_omb_util_add_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.sh b/themes/pete/pete.theme.sh index 42f2f01..b988352 100644 --- a/themes/pete/pete.theme.sh +++ b/themes/pete/pete.theme.sh @@ -10,7 +10,7 @@ prompt_setter() { PS4='+ ' } -safe_append_prompt_command prompt_setter +_omb_util_add_prompt_command prompt_setter SCM_THEME_PROMPT_DIRTY=" ✗" SCM_THEME_PROMPT_CLEAN=" ✓" diff --git a/themes/powerline-multiline/powerline-multiline.theme.sh b/themes/powerline-multiline/powerline-multiline.theme.sh index fc9f2b1..9f69a0a 100644 --- a/themes/powerline-multiline/powerline-multiline.theme.sh +++ b/themes/powerline-multiline/powerline-multiline.theme.sh @@ -50,4 +50,4 @@ IN_VIM_THEME_PROMPT_TEXT="vim" POWERLINE_LEFT_PROMPT=${POWERLINE_LEFT_PROMPT:="scm python_venv ruby cwd"} POWERLINE_RIGHT_PROMPT=${POWERLINE_RIGHT_PROMPT:="in_vim clock battery user_info"} -safe_append_prompt_command __powerline_prompt_command +_omb_util_add_prompt_command __powerline_prompt_command diff --git a/themes/powerline-naked/powerline-naked.theme.sh b/themes/powerline-naked/powerline-naked.theme.sh index 9d25b44..8382174 100644 --- a/themes/powerline-naked/powerline-naked.theme.sh +++ b/themes/powerline-naked/powerline-naked.theme.sh @@ -49,4 +49,4 @@ IN_VIM_THEME_PROMPT_TEXT="vim" POWERLINE_PROMPT=${POWERLINE_PROMPT:="user_info scm python_venv ruby cwd"} -safe_append_prompt_command __powerline_prompt_command +_omb_util_add_prompt_command __powerline_prompt_command diff --git a/themes/powerline-plain/powerline-plain.theme.sh b/themes/powerline-plain/powerline-plain.theme.sh index 7da07e1..bdcee4e 100644 --- a/themes/powerline-plain/powerline-plain.theme.sh +++ b/themes/powerline-plain/powerline-plain.theme.sh @@ -45,4 +45,4 @@ IN_VIM_THEME_PROMPT_TEXT="vim" POWERLINE_PROMPT=${POWERLINE_PROMPT:="user_info scm python_venv ruby cwd"} -safe_append_prompt_command __powerline_prompt_command +_omb_util_add_prompt_command __powerline_prompt_command diff --git a/themes/powerline/powerline.theme.sh b/themes/powerline/powerline.theme.sh index d396c04..2b815b1 100644 --- a/themes/powerline/powerline.theme.sh +++ b/themes/powerline/powerline.theme.sh @@ -48,4 +48,4 @@ IN_VIM_THEME_PROMPT_TEXT="vim" POWERLINE_PROMPT=${POWERLINE_PROMPT:="user_info scm python_venv ruby cwd"} -safe_append_prompt_command __powerline_prompt_command +_omb_util_add_prompt_command __powerline_prompt_command diff --git a/themes/primer/primer.theme.sh b/themes/primer/primer.theme.sh index c9cdb35..fc66622 100644 --- a/themes/primer/primer.theme.sh +++ b/themes/primer/primer.theme.sh @@ -8,4 +8,4 @@ function prompt_command() { THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"$blue"} THEME_CLOCK_FORMAT=${THEME_CLOCK_FORMAT:-"%I:%M:%S"} -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/pro/pro.theme.sh b/themes/pro/pro.theme.sh index 1c7de29..bc0450a 100644 --- a/themes/pro/pro.theme.sh +++ b/themes/pro/pro.theme.sh @@ -19,4 +19,4 @@ function prompt() { PS1="\h: \W $(scm_prompt_info)${reset_color} $ " } -safe_append_prompt_command prompt +_omb_util_add_prompt_command prompt diff --git a/themes/pure/pure.theme.sh b/themes/pure/pure.theme.sh index b75d3f8..5572120 100644 --- a/themes/pure/pure.theme.sh +++ b/themes/pure/pure.theme.sh @@ -40,4 +40,4 @@ pure_prompt() { esac } -safe_append_prompt_command pure_prompt +_omb_util_add_prompt_command pure_prompt diff --git a/themes/purity/purity.theme.sh b/themes/purity/purity.theme.sh index fd8b60e..1f6f341 100644 --- a/themes/purity/purity.theme.sh +++ b/themes/purity/purity.theme.sh @@ -18,4 +18,4 @@ function prompt_command() { PS1="\n${blue}\w $(scm_prompt_info)\n${ret_status} " } -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/rainbowbrite/rainbowbrite.theme.sh b/themes/rainbowbrite/rainbowbrite.theme.sh index 0f76fc1..6533ded 100644 --- a/themes/rainbowbrite/rainbowbrite.theme.sh +++ b/themes/rainbowbrite/rainbowbrite.theme.sh @@ -18,7 +18,7 @@ prompt_setter() { PS4='+ ' } -safe_append_prompt_command prompt_setter +_omb_util_add_prompt_command prompt_setter SCM_NONE_CHAR='·' SCM_THEME_PROMPT_DIRTY=" ${red}✗" diff --git a/themes/rana/rana.theme.sh b/themes/rana/rana.theme.sh index 79fadfb..ab1d660 100644 --- a/themes/rana/rana.theme.sh +++ b/themes/rana/rana.theme.sh @@ -211,4 +211,4 @@ ${D_INTERMEDIATE_COLOR}$ ${D_DEFAULT_COLOR}" } # Runs prompt (this bypasses oh-my-bash $PROMPT setting) -safe_append_prompt_command prompt +_omb_util_add_prompt_command prompt diff --git a/themes/rjorgenson/rjorgenson.theme.sh b/themes/rjorgenson/rjorgenson.theme.sh index e866f0e..5c0dbb8 100644 --- a/themes/rjorgenson/rjorgenson.theme.sh +++ b/themes/rjorgenson/rjorgenson.theme.sh @@ -97,4 +97,4 @@ PS2="└─$(my_prompt_char)" -safe_append_prompt_command prompt +_omb_util_add_prompt_command prompt diff --git a/themes/roderik/roderik.theme.sh b/themes/roderik/roderik.theme.sh index 8a1c104..8f74b37 100644 --- a/themes/roderik/roderik.theme.sh +++ b/themes/roderik/roderik.theme.sh @@ -14,4 +14,4 @@ function prompt_command() { fi } -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/sexy/sexy.theme.sh b/themes/sexy/sexy.theme.sh index 60e00ec..44c0d69 100644 --- a/themes/sexy/sexy.theme.sh +++ b/themes/sexy/sexy.theme.sh @@ -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\]" } -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/simple/simple.theme.sh b/themes/simple/simple.theme.sh index 999cfe6..3c1cffe 100644 --- a/themes/simple/simple.theme.sh +++ b/themes/simple/simple.theme.sh @@ -22,4 +22,4 @@ SCM_THEME_PROMPT_CLEAN=" ✓" SCM_THEME_PROMPT_PREFIX="(" SCM_THEME_PROMPT_SUFFIX=")" -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/sirup/sirup.theme.sh b/themes/sirup/sirup.theme.sh index 289ce97..a8f6566 100644 --- a/themes/sirup/sirup.theme.sh +++ b/themes/sirup/sirup.theme.sh @@ -17,4 +17,4 @@ function prompt_command { PS1="$blue\W/$bold_blue$(_omb_theme_sirup_rubygem)$bold_green$(__git_ps1 " (%s)") ${normal}$ " } -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/slick/slick.theme.sh b/themes/slick/slick.theme.sh index aafdc25..792b6e5 100644 --- a/themes/slick/slick.theme.sh +++ b/themes/slick/slick.theme.sh @@ -83,4 +83,4 @@ PS2="> " -safe_append_prompt_command prompt +_omb_util_add_prompt_command prompt diff --git a/themes/standard/standard.theme.sh b/themes/standard/standard.theme.sh index 561a97c..45e6f30 100644 --- a/themes/standard/standard.theme.sh +++ b/themes/standard/standard.theme.sh @@ -21,4 +21,4 @@ function prompt_command() { PROMPT='${green}\u${normal}@${green}\h${normal}:${blue}\w${normal}${red}$(prompt_char)$(git_prompt_info)${normal}\$ ' } -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/tonka/tonka.theme.sh b/themes/tonka/tonka.theme.sh index e97a571..179d465 100644 --- a/themes/tonka/tonka.theme.sh +++ b/themes/tonka/tonka.theme.sh @@ -49,7 +49,7 @@ PS2="$LIGHT_BLUE-$YELLOW-$YELLOW-$NO_COLOUR " } -safe_append_prompt_command prompt_setter +_omb_util_add_prompt_command prompt_setter THEME_SHOW_CLOCK=${THEME_SHOW_CLOCK:-"true"} THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"\[\033[1;33m\]"} diff --git a/themes/tonotdo/tonotdo.theme.sh b/themes/tonotdo/tonotdo.theme.sh index 347e586..edaa9b9 100644 --- a/themes/tonotdo/tonotdo.theme.sh +++ b/themes/tonotdo/tonotdo.theme.sh @@ -10,4 +10,4 @@ function prompt_command() { PS1="${yellow}\u${normal}${cyan}@\h${normal}${purple} ${normal}${green}\w${normal}$(scm_prompt_info)> " } -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/tylenol/tylenol.theme.sh b/themes/tylenol/tylenol.theme.sh index db39e2c..f8c7d2b 100644 --- a/themes/tylenol/tylenol.theme.sh +++ b/themes/tylenol/tylenol.theme.sh @@ -17,4 +17,4 @@ function prompt_command() { PS1="\n${green}$(_omb_prompt_print_python_venv)${red}$(_omb_prompt_print_ruby_env) ${reset_color}\h ${orange}in ${reset_color}\w\n${yellow}$(scm_char)$(scm_prompt_info) ${yellow}→${white} " } -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/zitron/zitron.theme.sh b/themes/zitron/zitron.theme.sh index 56b7bfa..bb9bcce 100644 --- a/themes/zitron/zitron.theme.sh +++ b/themes/zitron/zitron.theme.sh @@ -21,4 +21,4 @@ function prompt_command() { PS1="${no_color}\u:$(hostname)${normal}:${bold_yellow}\W/${normal} $(git_prompt_info)${reset_color}$ " } -safe_append_prompt_command prompt_command +_omb_util_add_prompt_command prompt_command diff --git a/themes/zork/zork.theme.sh b/themes/zork/zork.theme.sh index 75bc17d..5db57db 100644 --- a/themes/zork/zork.theme.sh +++ b/themes/zork/zork.theme.sh @@ -94,4 +94,4 @@ PS2="└─▪ " -safe_append_prompt_command prompt +_omb_util_add_prompt_command prompt