mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2025-12-04 21:56:46 +01:00
Make check for segments in use take joined segments into account
This commit is contained in:
parent
690af685ef
commit
1015b38cf2
2 changed files with 5 additions and 6 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue