aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-07-23 17:20:59 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-07-23 17:20:59 +0300
commit12a99c087d1005c9ea783a4a1b1c89ad7b7ff647 (patch)
treee7166e3acb5dfb02d3c9d792544be53c782ee1a9 /functions
parentd63fd9a8733876d0cbe3dd0e591b76aecb504d7e (diff)
continue param refactoring
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/utilities.zsh6
1 files changed, 2 insertions, 4 deletions
diff --git a/functions/utilities.zsh b/functions/utilities.zsh
index f0263ce6..4d731eb4 100755
--- a/functions/utilities.zsh
+++ b/functions/utilities.zsh
@@ -90,10 +90,8 @@ function _p9k_human_readable_bytes() {
# either the LEFT or RIGHT prompt arrays.
# * $1: The segment to be tested.
segment_in_use() {
- [[ -n "${POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[(r)${1}]}" ||
- -n "${POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[(r)${1}_joined]}" ||
- -n "${POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[(r)${1}]}" ||
- -n "${POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[(r)${1}_joined]}" ]]
+ (( $_POWERLEVEL9K_LEFT_PROMPT_ELEMENTS[(I)$1(|_joined)] ||
+ $_POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS[(I)$1(|_joined)] ))
}
function _p9k_parse_ip() {