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

Re: cd completion and CDABLE_VARS



> When I now hit ^xh I get the following:
> 
> 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)

Sounds like you need to read zshcompsys for some orientation.  (I don't
mean to claim that's necessarily as enlightening as you might wish.)

As I said before, the names on the left are the tags.  What I didn't say
was the names in parentheses are the functions implementing completion
for those tags.  This gives you a hint about what the tags are used for.

_alternative is a utility function and we should probably suppress it
from the list since it doesn't generate its own completions (I think
that's easy to do but I haven't looked at the code).

There's no precedence until you use tag-order as I described before.
The lines are simply to associate tags with different completers.

> I see, that the user names are used for the name expansion. I do not
> want that. How can I switch this off?

Instead of putting '*' in the last value in tag-order, just put
in named-directories, giving

zstyle ':completion:*:complete:(cd|pushd):*' tag-order \
  'local-directories path-directories directory-stack' 'named-directories'

This time I've added pushd explicitly.  Note that it is harmless to add
tags which the completer in question doesn't actually use.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



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