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

completion oddity



If I have a completion function like this:

    _k () { _arguments --r1-word --r2-word }

and I press TAB at the end of the following commandline:

    % k --r

then I get

    % k --r-word

Another tab beeps and lists the choices, a third tab beeps and chooses
--r1-word, and thereon tabs simply cycle between the two.  That's more or
less expected.

If I define _k instead as

    _k () { _arguments --r1-word --really-r1-word }

then the second tab simply completes --r1-word, which seems wrong to me.

This is all with "zsh -f", with nothing but

    autoload -Uz compinit
    compinit -i
    compdef _k k

run before attempting the completion.

A co-worker says he noticed this behavior change (from better to worse)
sometime around the switch in Solaris from 4.3.10 to 4.3.12, but I can
reproduce it on our builds that had 4.3.9, so I'm guessing it's been around
for a while.

Thanks,
Danek



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