Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: PATCH: more fun with `zle'
- X-seq: zsh-workers 6994
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: "Sven Wischnowsky" <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>, <zsh-workers@xxxxxxxxxxxxxx>
- Subject: RE: PATCH: more fun with `zle'
- Date: Wed, 7 Jul 1999 12:13:28 +0400
- Importance: Normal
- In-reply-to: <199907070751.JAA09744@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
>
> And: all of this is only a suggestion for things that may be
> interesting to have. I'm not really happy with the argument-parsing
> and -naming of `zle' (and I never really understood why we have to
> have the concept of a widget -- maybe a special builtin/shell
> function-type would be more appropriate nowadays; but that's a
> different story).
>
As I understand it, it gives you additional flexibility. You can have a single
function that is linked to more than one widget. Widget name is available so
function can behave differently. Currently I have e.g. function
((${+NUMERIC})) || zle .set-local-history
if [[ $WIDGET == .* ]]
then
zle $WIDGET
else
zle .$WIDGET
fi
((${+NUMERIC})) || zle .set-local-history
and redefine all *history* widgets to use this function. Implementing the same
directly as function would depend on FUNCTIONARGZERO setting.
/andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author