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

Re: Strange _values completion on accept-and-menu-complete and menu selection



On Mon, 13 Dec 2004, Andrey Borzenkov wrote:

> > Normally compstate[compound_word] would be unset, but "compvalues -i"
> > would set it based on the parse.
> 
> I still believe this is more general and should not be limited to _values 

Sure; compstate[compound_word] doesn't have to be read-only, any function
that needs it could set it.  It just seems correct and convenient to have
compvalues set it automatically.

> Here is updated patch (which also fixes initialization problem).

There's one line of shell code where you have compstate[compound] but want
compstate[compound_word].  No need to repost, but fix before commit.

> This still has problems in completing nested calls to _values (should it 
> work?)

I don't have time to debug carefully just now, but I suspect without any 
real evidence that compstate[compound_word] is becoming unset on return 
from the nested call and therefore is wrong for the subsequent selections
for the outer call.



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