when shortening with truncate_to_unique, never produce just dots for a segment

pull/735/head
romkatv 5 years ago
parent 3de6154ee7
commit 22396b86f3

@ -1800,7 +1800,7 @@ prompt_dir() {
(( q )) && parts[i]="\${(Q)\${:-${(qqq)${(q)sub}}}}" (( q )) && parts[i]="\${(Q)\${:-${(qqq)${(q)sub}}}}"
parts[i]+=$'\2' parts[i]+=$'\2'
else else
local -i j=1 local -i j=$sub[(i)[^.]]
for (( ; j + d < $#sub; ++j )); do for (( ; j + d < $#sub; ++j )); do
local -a matching=($parent/$sub[1,j]*/(N)) local -a matching=($parent/$sub[1,j]*/(N))
(( $#matching == 1 )) && break (( $#matching == 1 )) && break

Loading…
Cancel
Save