From c59720647a328c9dfdd96702ee22d4217c0974ed Mon Sep 17 00:00:00 2001 From: Roman Perepelitsa Date: Tue, 25 May 2021 14:01:41 +0200 Subject: [PATCH] fix asdf, was broken by 1ad8e5759ecd41619746a775d9bc9d2902c5c90e (#1409) --- internal/p10k.zsh | 10 +++++++--- 1 file 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