Skip to content

Commit

Permalink
Correct issues with default theme on zsh
Browse files Browse the repository at this point in the history
- Use added `NewLine` variable for zsh-specific newline
- `Time12a` variant added for zsh
  • Loading branch information
MPLew-is authored and guenhter committed Feb 21, 2023
1 parent b4195a0 commit b7f0bd7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions themes/Default.bgptheme
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ define_helpers() {
NewLine="\n"

if [ -n "$ZSH_VERSION" ]; then
Time12a="%T"
PathShort="%~"
NewLine=$'\n'
fi
Expand Down Expand Up @@ -90,8 +91,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"
Expand Down

0 comments on commit b7f0bd7

Please sign in to comment.