From: Abhijeet Rastogi <abhijeet.1989@gmail.com>
To: zsh-workers@zsh.org
Subject: String partial match from both left and right.
Date: Fri, 31 Aug 2018 15:54:02 +0530 [thread overview]
Message-ID: <CACXxYfxO8Ws4+Tf-NqSZW9b7gP7opRiEY5Dtpm7ZABG1K0N6Lg@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 630 bytes --]
Hi everyone,
I have this super simple zsh completion function.
function hello() {
arg=${@[1]}
echo $arg
}
function _hello {
_values -s ' ' 'dashboards' foo bar foo-bar
}
compdef _hello hello
And what I want is, if I do:-
$hello bar<TAB>
I want `foo-bar` to come in the completion menu. I figured that it has
something to do with mater-list but I can't seem to get it working.
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'l:|=* r:|=*'
Let me know if you guys need any more debugging info. I've been scratching
my head on this one but can't get it to work.
--
Cheers,
Abhijeet Rastogi (shadyabhi)
next reply other threads:[~2018-08-31 10:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20180831102508epcas4p4e1fdd60db2ae6336248268c887908f23@epcas4p4.samsung.com>
2018-08-31 10:24 ` Abhijeet Rastogi [this message]
2018-08-31 11:01 ` Peter Stephenson
2018-08-31 11:11 ` Oliver Kiddle
2018-09-02 4:37 ` Abhijeet Rastogi
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=CACXxYfxO8Ws4+Tf-NqSZW9b7gP7opRiEY5Dtpm7ZABG1K0N6Lg@mail.gmail.com \
--to=abhijeet.1989@gmail.com \
--cc=zsh-workers@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).