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

Difficulties with _oldlist



In _oldlist is this test:

elif [[ $WIDGET = *complete(|-prefix|-word) ]] &&
     zstyle -T ":completion:${curcontext}:" old-menu; then

This effectively means that, in order to use _oldlist, user-defined 
completion widgets must have names ending in "complete".

This should at the very least be documented.  A better solution would be 
if $WIDGET could be replaced by a different variable, say $WIDGETSTYLE for 
example, which is set corresponding to the second argument of "zle -C".
I.e. if the widget were defined with

	zle -C blather list-choices blather

then at time of call $WIDGETSTYLE would be "list-choices", and _oldlist
could examine that instead of $WIDGET.

This would also solve a longstanding problem with _complete_debug (which
could be tweaked by renaming it to _debug_complete in the meantime).



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