* Cursor location after completion with matchspec
@ 2018-11-03 17:15 Daniel Shahaf
0 siblings, 0 replies; 1+ messages 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] 1+ messages in thread
only message in thread, back to index
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
zsh-users
Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-users
Newsgroup available over NNTP:
nntp://inbox.vuxu.org/vuxu.archive.zsh.users
AGPL code for this site: git clone https://public-inbox.org/ public-inbox