zsh-users
 help / color / mirror / code / Atom feed
* Cursor location after completion with matchspec
@ 2018-11-03 17:15 Daniel Shahaf
  0 siblings, 0 replies; only message in thread
From: Daniel Shahaf @ 2018-11-03 17:15 UTC (permalink / raw)
  To: zsh-users

$ 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-11-03 17:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-03 17:15 Cursor location after completion with matchspec Daniel Shahaf

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