zsh-users
 help / color / mirror / code / Atom feed
* Questions about completion matchers
@ 2021-09-21  9:23 Marlon Richert
  2021-09-22 23:25 ` Bart Schaefer
  2021-09-26 13:09 ` Oliver Kiddle
  0 siblings, 2 replies; 11+ messages in thread
From: Marlon Richert @ 2021-09-21  9:23 UTC (permalink / raw)
  To: Zsh Users

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'.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-10-10 20:16 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-21  9:23 Questions about completion matchers Marlon Richert
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

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).