Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion: How to show description for current option?
- X-seq: zsh-users 27038
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Cc: Marlon Richert <marlon.richert@xxxxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Completion: How to show description for current option?
- Date: Tue, 31 Aug 2021 17:23:46 -0700
- Archived-at: <https://zsh.org/users/27038>
- In-reply-to: <CAH+w=7avzu2W=9kq=MPN95AD3ju4=54gFj-A4Y6Jp8h2pFE_jw@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- References: <CAHLkEDtFKQcbOAiABdO5ges98hByAnuhtqNVPPxZYNoJ8gH8Xw@mail.gmail.com> <CAN=4vMqfQ5gSAjn==JRDxzs1WHMBrWasxnd9_2GSjEdo5KRQyw@mail.gmail.com> <CAH+w=7avzu2W=9kq=MPN95AD3ju4=54gFj-A4Y6Jp8h2pFE_jw@mail.gmail.com>
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