diff options
author | Roman Perepelitsa <roman.perepelitsa@gmail.com> | 2021-05-25 15:01:41 +0300 |
---|---|---|
committer | Roman Perepelitsa <roman.perepelitsa@gmail.com> | 2021-05-25 15:01:41 +0300 |
commit | c59720647a328c9dfdd96702ee22d4217c0974ed (patch) | |
tree | f051c02a0f5d091b897b16353bc75febffebd6d9 /internal/p10k.zsh | |
parent | a3494a52d7c01fbc28e7ab12b7af347860aa62a7 (diff) |
fix asdf, was broken by 1ad8e5759ecd41619746a775d9bc9d2902c5c90e (#1409)
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r-- | internal/p10k.zsh | 10 |
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 |