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

Re: Completion: How to show description for current option?



On Tue, Aug 31, 2021 at 10:22 AM Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> That might be all that's needed; a matcher-list entry that allows '-'
> to become '--'.  But I suspect there's something deeper going on in
> the _git suite.

Indeed, the _git suite of functions almost always use _alternative,
which calls _describe with a hardcoded matcher which is prefixed to
whatever appears in the matcher_list style.  On line 41 of
_alternative:

_describe -t "${def%%:*}" "$descr" ws -M 'r:|[_-]=* r:|=*' "$subopts[@]"

I believe that makes it impossible to write a matcher-list zstyle that
will swap out "-" with "--" in the context where Marlon wants it.  Can
someone demonstrate a workaround?




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