zsh-users
 help / color / mirror / code / Atom feed
From: Marlon Richert <marlon.richert@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Questions about completion matchers
Date: Tue, 21 Sep 2021 12:23:04 +0300	[thread overview]
Message-ID: <CAHLkEDuT6iGYEivrHcML-dEaTMJUiGy-p39=2=kDEw1gL0i=Ew@mail.gmail.com> (raw)

How can I make a matcher that completes the right-most part (and only
the right-most part) of each subword? That is, given a target
completion 'abcDefGhi', how do I make a match specification that
completes inputs

* a
* aD
* abD
* aDG
* aDe
* aDeG

to this target, but not inputs

* D
* aG
* acD
* DG
* aDf
* aDeGi

?

Additionally, the following are unclear to me from the manual:
* What is the exact difference between l:lanchor||ranchor=tpat and
r:lanchor||ranchor=tpat ?
* Why do the examples in the manual add r:|=* to the end of each
matcher? This appears to make no difference at all.
* It appears that the order of "match descriptions" in a matchers
matters, but it is unclear to me in what way and it isn't mentioned in
the manual. For example, the pairs of matchers below differ only in
the order of their match descriptions, yet each produces a different
behavior. How are the match descriptions inside a matcher evaluated
and what causes the difference between these?
  * 'r:|[[:punct:]]=** l:?|=[[:punct:]]' completes 'cd a/b' to 'cd
a/bc', but 'l:?|=[[:punct:]] r:|[[:punct:]]=**' does not.
  * Given two target completions 'a-b' and 'a_b', both 'l:?|=[-_]
m:{-}={_}' and 'm:{-}={_} l:?|=[-_]' will insert 'a-b' as the
unambiguous substring on the first try, but on the second try, only
the former will then list both completions, whereas the latter will
complete only 'a-b'.


             reply	other threads:[~2021-09-21  9:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21  9:23 Marlon Richert [this message]
2021-09-22 23:25 ` Bart Schaefer
2021-09-26 13:09 ` Oliver Kiddle
2021-10-08 22:38   ` Marlon Richert
2021-10-09 16:23     ` Bart Schaefer
2021-10-09 22:12       ` Marlon Richert
2021-10-09 22:39         ` Bart Schaefer
2021-10-10 11:17           ` Marlon Richert
2021-10-09 21:59     ` Oliver Kiddle
2021-10-10 12:05       ` Marlon Richert
2021-10-10 20:14         ` Marlon Richert

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='CAHLkEDuT6iGYEivrHcML-dEaTMJUiGy-p39=2=kDEw1gL0i=Ew@mail.gmail.com' \
    --to=marlon.richert@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).