diff --git a/themes/Crunch.bgptheme b/themes/Crunch.bgptheme index 78b99a5..8dd182f 100644 --- a/themes/Crunch.bgptheme +++ b/themes/Crunch.bgptheme @@ -21,7 +21,7 @@ override_git_prompt_colors() { KERNEL_PROMPT='‹$(uname -r)›' -GIT_PROMPT_START_USER="_LAST_COMMAND_INDICATOR_${White}{${Yellow}${Time12a}${White}}[${Magenta}${RUBY_PROMPT}${White}]${Cyan}${PathShort}${White}:" + GIT_PROMPT_START_USER="_LAST_COMMAND_INDICATOR_${White}{${Yellow}${Time12a}${White}}[${Magenta}${RUBY_PROMPT}${White}]${Cyan}${PathShort}${White}:" GIT_PROMPT_START_ROOT="${GIT_PROMPT_START_USER}" GIT_PROMPT_END_USER="${BoldBlue} ➭ ${ResetColor}" GIT_PROMPT_END_ROOT="${BoldRed} # ${ResetColor}" diff --git a/themes/Custom.bgptemplate b/themes/Custom.bgptemplate index 8305d70..d494198 100644 --- a/themes/Custom.bgptemplate +++ b/themes/Custom.bgptemplate @@ -36,7 +36,12 @@ override_git_prompt_colors() { ## use the placeholder _VIRTUALENV_ will be replaced with ## the name of the current virtual environment (currently CONDA and VIRTUAL_ENV) # GIT_PROMPT_VIRTUALENV="(${Blue}_VIRTUALENV_${ResetColor}) " - + + # template for displaying the current remote tracking branch + # use the placeholder _UPSTREAM_ will be replaced with + # the name of the current remote tracking branch + # GIT_PROMPT_UPSTREAM=" {${Blue}_UPSTREAM_${ResetColor}}" + ## _LAST_COMMAND_INDICATOR_ will be replaced by the appropriate GIT_PROMPT_COMMAND_OK OR GIT_PROMPT_COMMAND_FAIL # GIT_PROMPT_START_USER="_LAST_COMMAND_INDICATOR_ ${Yellow}${PathShort}${ResetColor}" # GIT_PROMPT_START_ROOT="_LAST_COMMAND_INDICATOR_ ${GIT_PROMPT_START_USER}" diff --git a/themes/Default.bgptheme b/themes/Default.bgptheme index 7431630..9d5be91 100644 --- a/themes/Default.bgptheme +++ b/themes/Default.bgptheme @@ -28,8 +28,7 @@ unset_git_prompt_colors() { unset GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING } -define_helpers() -{ +define_helpers() { Time12a="\$(date +%H:%M)" PathShort="\w"; } diff --git a/themes/Single_line.bgptheme b/themes/Single_line.bgptheme index b64e361..985d92f 100644 --- a/themes/Single_line.bgptheme +++ b/themes/Single_line.bgptheme @@ -17,6 +17,7 @@ unset_git_prompt_colors() { unset GIT_PROMPT_COMMAND_OK unset GIT_PROMPT_COMMAND_FAIL unset GIT_PROMPT_VIRTUALENV + unset GIT_PROMPT_UPSTREAM unset GIT_PROMPT_START_USER unset GIT_PROMPT_START_ROOT unset GIT_PROMPT_END_USER @@ -27,8 +28,7 @@ unset_git_prompt_colors() { unset GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING } -define_helpers() -{ +define_helpers() { Time12a="\$(date +%H:%M)" PathShort="\w"; } diff --git a/themes/Single_line_Solarized.bgptheme b/themes/Single_line_Solarized.bgptheme index d44e0ea..7d25020 100644 --- a/themes/Single_line_Solarized.bgptheme +++ b/themes/Single_line_Solarized.bgptheme @@ -21,6 +21,7 @@ unset_git_prompt_colors() { unset GIT_PROMPT_COMMAND_OK unset GIT_PROMPT_COMMAND_FAIL unset GIT_PROMPT_VIRTUALENV + unset GIT_PROMPT_UPSTREAM unset GIT_PROMPT_START_USER unset GIT_PROMPT_START_ROOT unset GIT_PROMPT_END_USER @@ -31,8 +32,7 @@ unset_git_prompt_colors() { unset GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING } -define_helpers() -{ +define_helpers() { PathShort="${BoldBlue}\u:${Cyan}\W" } @@ -68,6 +68,11 @@ define_undefined_git_prompt_colors() { # the name of the current virtual environment (currently CONDA and VIRTUAL_ENV) if [[ -z ${GIT_PROMPT_VIRTUALENV} ]]; then GIT_PROMPT_VIRTUALENV="(${Blue}_VIRTUALENV_${ResetColor}) "; fi + # template for displaying the current remote tracking branch + # use the placeholder _UPSTREAM_ will be replaced with + # the name of the current remote tracking branch + if [[ -z ${GIT_PROMPT_UPSTREAM} ]]; then GIT_PROMPT_UPSTREAM=" {${Blue}_UPSTREAM_${ResetColor}}"; fi + # _LAST_COMMAND_INDICATOR_ will be replaced by the appropriate GIT_PROMPT_COMMAND_OK OR GIT_PROMPT_COMMAND_FAIL if [[ -z ${GIT_PROMPT_START_USER} ]]; then GIT_PROMPT_START_USER="_LAST_COMMAND_INDICATOR_ ${Yellow}${PathShort}${ResetColor}"; fi diff --git a/themes/Single_line_Ubuntu.bgptheme b/themes/Single_line_Ubuntu.bgptheme index 2a42acd..b8495d1 100644 --- a/themes/Single_line_Ubuntu.bgptheme +++ b/themes/Single_line_Ubuntu.bgptheme @@ -28,8 +28,7 @@ unset_git_prompt_colors() { unset GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING } -define_helpers() -{ +define_helpers() { Time12a="\$(date +%H:%M)" PathShort="\w"; } diff --git a/themes/Solarized_Extravagant.bgptheme b/themes/Solarized_Extravagant.bgptheme index f93c362..f87ccb4 100644 --- a/themes/Solarized_Extravagant.bgptheme +++ b/themes/Solarized_Extravagant.bgptheme @@ -23,7 +23,7 @@ override_git_prompt_colors() { KERNEL_PROMPT='‹$(uname -r)›' -GIT_PROMPT_START_USER="_LAST_COMMAND_INDICATOR_ ${BoldBlueFg}${Time12a} ${Green}${KERNEL_PROMPT} ${Cyan}${RUBY_PROMPT} ${Yellow}${PathShort}" + GIT_PROMPT_START_USER="_LAST_COMMAND_INDICATOR_ ${BoldBlueFg}${Time12a} ${Green}${KERNEL_PROMPT} ${Cyan}${RUBY_PROMPT} ${Yellow}${PathShort}" GIT_PROMPT_START_ROOT="${GIT_PROMPT_START_USER}" if [ -n "$SSH_CLIENT" ]; then GIT_PROMPT_END_USER="\n${BoldRed} ➤ ${ResetColor}"