zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Roman Perepelitsa <roman.perepelitsa@gmail.com>
Cc: Marlon Richert <marlon.richert@gmail.com>, Zsh Users <zsh-users@zsh.org>
Subject: Re: Completion: How to show description for current option?
Date: Tue, 31 Aug 2021 17:23:46 -0700	[thread overview]
Message-ID: <CAH+w=7Z3SsNzFOCf_tgQCJwXsr+sT3cKN4zyai3tfuT6ZW87Aw@mail.gmail.com> (raw)
In-Reply-To: <CAH+w=7avzu2W=9kq=MPN95AD3ju4=54gFj-A4Y6Jp8h2pFE_jw@mail.gmail.com>

On Tue, Aug 31, 2021 at 10:22 AM Bart Schaefer
<schaefer@brasslantern.com> 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?


  parent reply	other threads:[~2021-09-01  0:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-31 11:03 Marlon Richert
2021-08-31 11:11 ` Roman Perepelitsa
2021-08-31 17:22   ` Bart Schaefer
2021-08-31 17:39     ` Roman Perepelitsa
2021-09-01  0:23     ` Bart Schaefer [this message]
2021-09-01 11:27       ` Marlon Richert
2021-09-02 20:08 ` Oliver Kiddle
2021-09-02 20:41   ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7Z3SsNzFOCf_tgQCJwXsr+sT3cKN4zyai3tfuT6ZW87Aw@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=marlon.richert@gmail.com \
    --cc=roman.perepelitsa@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).