aboutsummaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-04-30 13:51:34 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-04-30 13:51:34 +0300
commit361eec6f95d31570c77b98f5405efe508592eadd (patch)
treea124b728f4b5649e6aaeccd535eeb2b1ec66f8a3 /powerlevel9k.zsh-theme
parent6ef8e2f0cfe726f6df8a47615f50f0c50ac25693 (diff)
replace all -v checks with equivalents (trying to port to zsh 5.2)
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme10
1 files changed, 5 insertions, 5 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 040e717f..242c8cc9 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -55,7 +55,7 @@ if ! autoload -U is-at-least || ! is-at-least 5.2; then
return 1
fi
-if [[ -v _P9K_SOURCED ]]; then
+if (( $+_P9K_SOURCED )); then
prompt_powerlevel9k_setup "$@"
return
fi
@@ -1608,7 +1608,7 @@ powerlevel9k_vcs_init() {
local component state
for component in REMOTE_URL COMMIT BRANCH TAG REMOTE_BRANCH STAGED UNSTAGED UNTRACKED \
OUTGOING_CHANGES INCOMING_CHANGES STASH ACTION; do
- local color=${(P):-POWERLEVEL9K_VCS_${component}FORMAT_FOREGROUND}
+ local color=${(P)${:-POWERLEVEL9K_VCS_${component}FORMAT_FOREGROUND}}
if [[ -n $color ]]; then
for state in "${(@k)vcs_states}"; do
local var=POWERLEVEL9K_VCS_${(U)state}_${component}FORMAT_FOREGROUND
@@ -1661,7 +1661,7 @@ typeset -gAH _P9K_LAST_GIT_PROMPT
typeset -gAH _P9K_GIT_SLOW
function _p9k_vcs_style() {
- local color=${(P):-POWERLEVEL9K_VCS_${1}_${2}FORMAT_FOREGROUND}
+ local color=${(P)${:-POWERLEVEL9K_VCS_${1}_${2}FORMAT_FOREGROUND}}
if [[ -z $color ]]; then
_P9K_RETVAL=""
return
@@ -1679,7 +1679,7 @@ function _p9k_vcs_style() {
}
function _p9k_vcs_render() {
- if [[ -v _P9K_NEXT_VCS_DIR ]]; then
+ if (( $+_P9K_NEXT_VCS_DIR )); then
local -a msg
local dir=${${GIT_DIR:a}:-$PWD}
while true; do
@@ -1864,7 +1864,7 @@ function _p9k_vcs_resume() {
function _p9k_vcs_gitstatus() {
[[ $POWERLEVEL9K_DISABLE_GITSTATUS == true ]] && return 1
if [[ $_P9K_REFRESH_REASON == precmd ]]; then
- if [[ -v _P9K_NEXT_VCS_DIR ]]; then
+ if (( $+_P9K_NEXT_VCS_DIR )); then
typeset -gH _P9K_NEXT_VCS_DIR=${${GIT_DIR:a}:-$PWD}
else
local dir=${${GIT_DIR:a}:-$PWD}