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

Re: PATCH: zstyle to control completion of functions/parameters beginning with underscore



On Mar 3, 10:33am, Greg Klanderman wrote:
} Subject: Re: PATCH: zstyle to control completion of functions/parameters b
} 
} Easiest is to just use 'zstyle -t' in the new use cases and leave the
} 'zstyle -T' as-is in the existing twelve uses.

That's probably fine.  I was just trying to avoid the situation where
the doc has to keep track of which cases default to true and which ones
default to false.  That is, there seem to be three choices from the
doc point of view:

(1) Explicitly list where it defaults to true and where false.
(2) Stop claiming there's any default at all, and say that when it
is not set, every context chooses the most-commonly-wanted behavior
for that context.  (Or the behavior that produces the smallest set
of matches, or whatever it is.)
(3) Give a name to "context chooses" and say that's the default.

The other advantage of (3) is that you can say things like

zstyle ':completion:*:foo:*' prefix-needed true
zstyle ':completion:*:foo:bar' prefix-needed auto

whereas if the only way to get "auto" is to leave the style unset,
you can't have the specific case differ from the wildcard case.  But
I don't know if there would ever be a need for that ... so I guess go
with (2) as easier, because (3) can always be done later.



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