aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2018-08-07 22:21:15 +0300
committerDominik Ritter <dritter03@googlemail.com>2018-08-07 22:21:15 +0300
commitebbdb3c1c011a1f024e80b50c6b8b4a4fa5c46e2 (patch)
treedfb815497c5d29b5ac6450bb7a72c930cac2f0d9 /powerlevel9k.zsh-theme
parent345cf87b8f1f1c9b7e1396b7ab2fd9c4400a8cd0 (diff)
Make purpose clear of backgroundColor and foregroundColor functions
The functions just start the colors, they do not end them. It seems too much to have a function that terminates a color.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme8
1 files changed, 4 insertions, 4 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 3e425c48..97bddc30 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -127,8 +127,8 @@ left_prompt_segment() {
[[ -n $FG_COLOR_MODIFIER ]] && 4="$FG_COLOR_MODIFIER"
local bg fg
- [[ -n "$3" ]] && bg="$(backgroundColor $3)" || bg="$(backgroundColor)"
- [[ -n "$4" ]] && fg="$(foregroundColor $4)" || fg="$(foregroundColor)"
+ [[ -n "$3" ]] && bg="$(backgroundColor $3)" || bg="%k"
+ [[ -n "$4" ]] && fg="$(foregroundColor $4)" || fg="%f"
if [[ $CURRENT_BG != 'NONE' ]] && ! isSameColor "$3" "$CURRENT_BG"; then
echo -n "$bg%F{$CURRENT_BG}"
@@ -220,8 +220,8 @@ right_prompt_segment() {
[[ -n $FG_COLOR_MODIFIER ]] && 4="$FG_COLOR_MODIFIER"
local bg fg
- [[ -n "$3" ]] && bg="$(backgroundColor $3)" || bg="$(backgroundColor)"
- [[ -n "$4" ]] && fg="$(foregroundColor $4)" || fg="$(foregroundColor)"
+ [[ -n "$3" ]] && bg="$(backgroundColor $3)" || bg="%k"
+ [[ -n "$4" ]] && fg="$(foregroundColor $4)" || fg="%f"
# If CURRENT_RIGHT_BG is "NONE", we are the first right segment.