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

Re: Difficulties with _oldlist



On Wed, 8 Sep 2004, Peter Stephenson wrote:

> Bart Schaefer wrote:
> > $WIDGET could be replaced by a different variable, say $WIDGETSTYLE for
> > example, which is set corresponding to the second argument of "zle -C".
> 
> This is the internal implementation.  For a "zle -N" widget $WIDGETSTYLE
> gives the name of the function that implements the widget.

Hmm, interesting.  I'd rather put the name of the function in yet another
variable (WIDGETFUNC ?) and have it available for "zle -C" widgets, too.

For "zle -N" widgets, I think WIDGETSTYLE should initially be unset, so it 
can be tested with [[ -z ]] to differentiate completion from "normal" when 
inside a widget function.  (If it's just the function name, there's no way 
of preventing a function having the same name as a builtin widget, thereby
confusing matters.)



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