aboutsummaryrefslogtreecommitdiff
path: root/internal/p10k.zsh
diff options
context:
space:
mode:
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r--internal/p10k.zsh10
1 files changed, 7 insertions, 3 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh
index 767aca10..8ceaaffb 100644
--- a/internal/p10k.zsh
+++ b/internal/p10k.zsh
@@ -5350,10 +5350,14 @@ function prompt_asdf() {
local -A versions
local -a stat
- zstat -A stat +mtime ~ 2>/dev/null || return
- local dirs=($_p9k__parent_dirs ~)
- local mtimes=($_p9k__parent_mtimes $stat[1])
local -i has_global
+ local dirs=($_p9k__parent_dirs)
+ local mtimes=($_p9k__parent_mtimes)
+ if [[ $dirs[-1] != ~ ]]; then
+ zstat -A stat +mtime ~ 2>/dev/null || return
+ dirs+=(~)
+ mtimes+=($stat[1])
+ fi
local elem
for elem in ${(@)${:-{1..$#dirs}}/(#m)*/${${:-$MATCH:$_p9k__asdf_dir2files[$dirs[MATCH]]}#$MATCH:$mtimes[MATCH]:}}; do