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

Re: Bug w/matching control + feature request

Thanks for adding the cycle-completion-positions code, Sven!  Though, there
seems to be a problem with it.

Check out
% zsh -f
host% autoload -U compinit cycle-completion-positions ; compinit -D 
host% compdef _tst tst
host% _tst () {compadd -M 'r:|[.,_-]=** r:[^0-9]||[0-9]=**' _cd a_c ab_c
host% zle -N cycle cycle-completion-positions
host% bindkey "^T" cycle
host% tst _c<TAB><^T>

After the tab it lists the possible completions.  But the value of
$_lastcomp[insert_positions] is 4:6:6, which causes the
cycle-completion-positions to get stuck at cursor position 6.  Not sure
if there should be unique values or cycle-completion-positions should
be able to deal with the duplicate values.

There are other cases, where there is only one value but there should be
multiple positions.  But I wasn't sure if it would be possible to list all the
positions. (Use same input but with
	_tst () {compadd -M 'r:|[.,_-]=** r:[^0-9]||[0-9]=**' _cd a_c ab_c }

and the positions are 6:6, and there should be two positions.)


Do You Yahoo!?
Yahoo! Photos - Share your holiday photos online!

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