aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xfunctions/utilities.zsh9
-rwxr-xr-xpowerlevel9k.zsh-theme2
2 files changed, 5 insertions, 6 deletions
diff --git a/functions/utilities.zsh b/functions/utilities.zsh
index 8c18bb44..388eb0e1 100755
--- a/functions/utilities.zsh
+++ b/functions/utilities.zsh
@@ -202,11 +202,10 @@ fi
# * $1: The segment to be tested.
segment_in_use() {
local key=$1
- if [[ -n "${POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[(r)$key]}" ]] || [[ -n "${POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[(r)$key]}" ]]; then
- return 0
- else
- return 1
- fi
+ [[ -n "${POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[(r)${key}]}" ||
+ -n "${POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[(r)${key}_joined]}" ||
+ -n "${POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[(r)${key}]}" ||
+ -n "${POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[(r)${key}_joined]}" ]]
}
# Print a deprecation warning if an old segment is in use.
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 9693dd8c..4939cb35 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -1910,7 +1910,7 @@ prompt_powerlevel9k_setup() {
# initialize colors
autoload -U colors && colors
- if segment_in_use "vcs" || segment_in_use "vcs_joined"; then
+ if segment_in_use "vcs"; then
powerlevel9k_vcs_init
fi