From 22396b86f34f8d526479ac6d8b30e0ab2b8be9aa Mon Sep 17 00:00:00 2001 From: romkatv Date: Sat, 9 May 2020 19:51:57 +0200 Subject: [PATCH] when shortening with truncate_to_unique, never produce just dots for a segment --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index ee36ace3..3892109a 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -1800,7 +1800,7 @@ prompt_dir() { (( q )) && parts[i]="\${(Q)\${:-${(qqq)${(q)sub}}}}" parts[i]+=$'\2' else - local -i j=1 + local -i j=$sub[(i)[^.]] for (( ; j + d < $#sub; ++j )); do local -a matching=($parent/$sub[1,j]*/(N)) (( $#matching == 1 )) && break