Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Cursor location after completion with matchspec



$ 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



Messages sorted by: Reverse Date, Date, Thread, Author