Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh-5.0.4: cd autocompletion broken for "../" when CDPATH is set



On Dec 30, 11:17am, Bart Schaefer wrote:
} Subject: Re: zsh-5.0.4: cd autocompletion broken for "../" when CDPATH is 
}
} On Dec 30,  3:50pm, Martin Birgmeier wrote:
} }
} } Since the upgrade to 5.0.4, whenever I type (in any directory)
} } 
} } # cd ../<TAB>
} } 
} } then instead of autocompleting the entries in .., I get all entries in
} } all of the CDPATH components.
} 
} -  if [[ $PREFIX != (\~|/|./|../)* ]]; then
} +  if [[ $PREFIX != (\~|/|./|../)* && -z $tmpWpath ]]; then
 
... in which case the reference to tmpWpath in that block would not be
needed at all.  Hmm.  That's not right.  What we want is more like:

diff --git a/Completion/Zsh/Command/_cd b/Completion/Zsh/Command/_cd
index b9860ff..6b8d7eb 100644
--- a/Completion/Zsh/Command/_cd
+++ b/Completion/Zsh/Command/_cd
@@ -63,7 +63,7 @@ else
     fi
   fi
 
-  if [[ $PREFIX != (\~|/|./|../)* ]]; then
+  if [[ $PREFIX != (\~|/|./|../)* && $IPREFIX != ../* ]]; then
     local tmpcdpath alt
 
     alt=()


So please ignore 32203.



Messages sorted by: Reverse Date, Date, Thread, Author