aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2019-04-01 01:05:39 +0300
committerGitHub <noreply@github.com>2019-04-01 01:05:39 +0300
commit469ff8dedac026b4ee349e4eccb660abe2023c6b (patch)
treee3240ddf91ef15e7a791b2dd99a54fc0a3587468
parentc4a8118b4574b5746da3cf99ea2b8f11500470ad (diff)
parent1015b38cf2b32c1f9d2236fdcbc59c3bc6697d33 (diff)
Merge pull request #1226 from matt1003/master
[Bugfix] Ensure that vcs init is invoked when using the "vcs_joined" segment.
-rwxr-xr-xfunctions/utilities.zsh9
1 files changed, 4 insertions, 5 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.