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

Re: Completion for cd



On Apr 2,  8:52am, Thorsten Haude wrote:
> 
> yooden@eumel % cd n
> tags in context :completion::complete:cd::
>     local-directories named-directories      (_alternative _cd) 
>     users named-directories directory-stack  (_tilde _alternative _cd) 
>     users                                    (_users _tilde _alternative _cd)
> 
> Well, there are users. How to remove them?

zstyle ':completion::complete:cd::' tag-order '! users' -

Should do it.  If you want it to complete users if and only if it can't
complete anything else, drop the trailing "-".  (Note that "users" won't
be removed from the <C-x h> output, but you should find that it doesn't
complete them any more.)

You might want to use ':completion:*:complete:cd:*' in case cd is used in
some other context, but that's "less specific" than the version without
the "*" for purposes of compsys selecting the most specific style.



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