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

Style names



I'm writing the part of compinstall version 2 which allows you to set
styles for minor completers such as _oldlist and _match.  The biggest
difficulty in setting styles automatically is working out what the context
should be.  For now, it's just set by the user and defaults to
:completion:*.  Ideally, it would be good if all the basic styles could
simply be set in this context without interfering with one another, so that
you only need to use a different context if you really want to narrow the
scope of the effect.

The particular problem is with `menu' and `list' in _oldlist, and
`original' in _match.  These do slightly different things to the same
styles when used elsewhere --- this is explicit in the manual --- so that
you need to alter the context to make the style change a different feature.
This is a little unnatural, and more importantly for my purpose harder to
do automatically.  I'd like to suggest, therefore, that the styles for
these uses be renamed to old-menu, old-list and match-original (or some
other set to be agreed upon).  Then I can simply whack them in without
worrying about altering the context.

If you can't see what I'm talking about, compare for example with
`insert-unambiguous': this too is used by different completers, namely
_approximate and _match, but this time does exactly the same thing in both
cases, so it's perfectly natural to have it set in the default context for
both matchers.  I think this distinction is important (though I wouldn't
have noticed if it wasn't making my life harder).

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>



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