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

Re: zstyle problems



Thanks,

but I still think this is a bit confusing. Typing 'cd' and then
pressing ^Xh says 'tags in context :completion::complete:cd::', which
made me think that this was the actual context... What would be the
correct way of defining different (individual) completions for 'cd' and other 
commands?

On Wed, Oct 02, 2002 at 03:15:16AM +0000, Bart Schaefer wrote:
> The individual command context is not yet established at the time the
> completer style is looked up; more specifically, the completer style is
> always checked with the context ":completion:::::" (except in specialty
> widgets like insert-and-predict).  The precise context including the
> command name (or contexts like "-tilde-") is actually set up *by* the
> completers.
> 

Ok, I tried this but I didn't see any difference from the standard
completion... Could this have something to do with menu completion and
sorting? If so, how can I disable sorting? The problem is that I have
more than 10 named dirs, and more than 100 users, and 98% of the time I
want to complete for my named dirs.

> } I also tried to change tag-order for the [-tilde-] completer so that it
> } would complete named directories before users, but that failed as
> } well...
> 
> Hmm.  The following works for me:
> 
>     zstyle ':completion::complete:-tilde-:*' tag-order \
> 	    named-directories users directory-stack
> 

Best regards, 
               .jonas.


-- 
while (!world->perfect) {
        whine (); 
}

[ PGP public key: http://www.iki.fi/jonas/pubkey.asc ]



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