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

Re: PATCH: (4/3) _git-buildpackage: use a #desc: line



Nikolai Weibull wrote:
> On Wed, Jun 29, 2011 at 23:30, Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx> wrote:
>
>>  If workers-29519 is applied, then this would make the already-existing
>>  `git-buildpackage' completion use a proper "#desc:" line, which could
>>  look like this:
>
> Does anyone have a better solution than this lying around?  I feel
> that this should be set with a zstyle, but I can’t figure out how, for
> example, _git-buildpackage would call zstyle when it’s only being
> autoloaded.  Should _git, once loaded, load all autoloaded _git-*
> functions so that they may set their description using zstyle?

Actually, I don't think this is something styles are right for. There's
no context sensitivity required, nor is there anything that needs to be
configured.

This is very much like `compinit' looking at the first line of _* files
from $fpath. That's probably not what all completions should be doing,
but _git isn't quite the common completion either. And this solution is
pretty straight forward.  So, unless there's some corner case I am
missing, I don't see why it should be changed to something that's (as I
pointed out earlier) less suited.

Regards, Frank



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