summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2019-07-19 15:27:16 +0300
committerromkatv <roman.perepelitsa@gmail.com>2019-07-19 15:27:16 +0300
commitfa457a3282795410f19f4c73d6893103f1c573ae (patch)
tree31646ea2c882c0aa6850dcb21da1c65c9d066096
parentd81b4dbf68ae004b852aa679226525ed87785e4d (diff)
fix purge when dir contains weird shit
-rwxr-xr-xinternal/p10k.zsh5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 8afc1b5c..bd59c9ae 100755
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -2164,8 +2164,9 @@ function _p9k_vcs_status_purge() {
unsetopt nomatch
local dir=$1
while true; do
- unset _P9K_LAST_GIT_PROMPT[$dir]
- unset _P9K_GIT_SLOW[$dir]
+ # unset doesn't work if $dir contains weird shit
+ _P9K_LAST_GIT_PROMPT[$dir]=""
+ _P9K_GIT_SLOW[$dir]=""
[[ $dir == / ]] && break
dir=${dir:h}
done