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

Re: Completion for cd



* Thorsten Haude (2004-03-28 22:34 +0100)
> * Thorsten Kampe wrote (2004-03-28 14:03):
>>* Thorsten Haude (2004-03-28 12:42 +0100)
>>> one of the last upgrades of Zsh in Debian Sarge changed the way
>>> directory names for cd are completed. With the current set of
>>> functions, user's home directories are completed, which is a nuisance.
>>> 
>>> I think I have found the file to change:
>>> /usr/share/zsh/4.1.1/functions/Completion/Zsh/_cd
>>> 
>>> Now, there are some problems:
>>> 1. I don't understand enough of the code to reliably remove user's
>>> home directories from completion. I could fall back to an older
>>> version of the file, but would loose completion of cdable vars.
>>> 
>>> The code in question is probably this part:
>>> [...]
>>> 
>>> How to rip out home dir completion without affecting cdable vars?
>>
>>Just don't "rip out" and modify the completion code. zsh isn't bash - 
>>use the possibility to modify the way zsh completes.
> 
> Well, that's what I wanted to do. In this case, I wanted to rip out
> home completion since I don't need it.

Sorry, I have no idea what you mean by "home dir completion". If you
mean the completion of named directories I already told you that zsh
doesn't do that unless you explicitly type a "~".

>>Have a look at the users' guide for "tag-order"...
> 
> Have done, but I couldn't make head or tails from it. What would I
> have to do to remove home completion?

zstyle ':completion:*:cd:*' tag-order !named-directories



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