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,  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.

My apologies.

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



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