1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-18 10:40:08 +00:00

Merge pull request #1226 from matt1003/master

[Bugfix] Ensure that vcs init is invoked when using the "vcs_joined" segment.
This commit is contained in:
Dominik Ritter 2019-04-01 00:05:39 +02:00 committed by GitHub
commit 469ff8deda
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.