From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: zsh-users@zsh.org
Subject: Cursor location after completion with matchspec
Date: Sat, 3 Nov 2018 17:15:22 +0000 [thread overview]
Message-ID: <20181103171522.o34q2mgigkshxorr@tarpaulin.shahaf.local2> (raw)
$ zsh -f
% _f() { compadd -M 'r:|[_-]=* r:|=*' foo-bar foo-lorem-ipsum }
% compdef _f f
% f <TAB>
% f foo<CURSOR>-
Would it be possible to have the completion result in «-foo-<CURSOR>»?
As it stands now, I can type «-» to get «foo-lorem-ipsum» but to get
«foo-bar» I have to press <forward-char> which means leaving the home
row.
This is a reduced example of «_arguments -foo-bar -foo-lorem-ipsum».
Cheers,
Daniel
reply other threads:[~2018-11-03 17:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20181103171522.o34q2mgigkshxorr@tarpaulin.shahaf.local2 \
--to=d.s@daniel.shahaf.name \
--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).