From 75bc41fcce58d4f66caf373ebd56ac74efa1d4ab Mon Sep 17 00:00:00 2001 From: Mike Lewis Date: Mon, 18 May 2020 16:56:23 -0700 Subject: [PATCH] Correct issues with default theme on zsh - Use added `NewLine` variable for zsh-specific newline - `Time12a` variant added for zsh --- themes/Default.bgptheme | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/themes/Default.bgptheme b/themes/Default.bgptheme index c0c4d00a..e21ff51b 100644 --- a/themes/Default.bgptheme +++ b/themes/Default.bgptheme @@ -34,6 +34,7 @@ define_helpers() { NewLine="\n" if [ -n "$ZSH_VERSION" ]; then + Time12a="%T" PathShort="%~" NewLine=$'\n' fi @@ -87,8 +88,8 @@ define_undefined_git_prompt_colors() { # _LAST_COMMAND_INDICATOR_ will be replaced by the appropriate GIT_PROMPT_COMMAND_OK OR GIT_PROMPT_COMMAND_FAIL if [ -z "${GIT_PROMPT_START_USER+x}" ]; then GIT_PROMPT_START_USER="_LAST_COMMAND_INDICATOR_ ${Yellow}${PathShort}${ResetColor}"; fi if [ -z "${GIT_PROMPT_START_ROOT+x}" ]; then GIT_PROMPT_START_ROOT="${GIT_PROMPT_START_USER}"; fi - if [ -z "${GIT_PROMPT_END_USER+x}" ]; then GIT_PROMPT_END_USER=" \n${White}${Time12a}${ResetColor} $ "; fi - if [ -z "${GIT_PROMPT_END_ROOT+x}" ]; then GIT_PROMPT_END_ROOT=" \n${White}${Time12a}${ResetColor} # "; fi + if [ -z "${GIT_PROMPT_END_USER+x}" ]; then GIT_PROMPT_END_USER=" ${NewLine}${White}${Time12a}${ResetColor} $ "; fi + if [ -z "${GIT_PROMPT_END_ROOT+x}" ]; then GIT_PROMPT_END_ROOT=" ${NewLine}${White}${Time12a}${ResetColor} # "; fi # Please do not add colors to these symbols if [ -z ${GIT_PROMPT_SYMBOLS_AHEAD+x} ]; then GIT_PROMPT_SYMBOLS_AHEAD="↑·"; fi # The symbol for "n versions ahead of origin"