check for joined segments when figuring out whether vcs is enabled; fixes #41

This commit is contained in:
romkatv 2019-03-26 15:29:31 +01:00
parent e5dbe4fa2e
commit 5bd80d88f1

View File

@ -79,8 +79,10 @@ printSizeHumanReadable() {
# * $1: The segment to be tested. # * $1: The segment to be tested.
segment_in_use() { segment_in_use() {
local key=$1 local key=$1
[[ -n "${POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[(r)$key]}" || [[ -n "${POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[(r)${key}]}" ||
-n "${POWERLEVEL9K_RIGHT_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]}" ]]
} }
################################################################ ################################################################