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

Glitch in _zle completion function



schaefer<501> zle blather <TAB>
_zle:shift:69: shift count must be <= $#
_zle:shift:70: shift count must be <= $#
_zle:shift:69: shift count must be <= $#
_zle:shift:70: shift count must be <= $#
_zle:shift:69: shift count must be <= $#
_zle:shift:70: shift count must be <= $#
_zle:shift:69: shift count must be <= $#
_zle:shift:70: shift count must be <= $#
schaefer<501> zle blather 
Completing widget arguments

(the shell printed a newline after all those errors, redrew the prompt,
and then displayed "Completing widget arguments" per my format style,
all from a single tab press).

What's happening is that we call _arguments to set $state, then go into
the "while (( $#state )): do" loop, inside which _arguments is called a
second time, which clears $state and $context so that the pair of shifts
at lines 69-70 subsequently fail.



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