Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: pass name ($0) and zmult ($1) to user-defined widgets
- X-seq: zsh-workers 4101
- From: Zefram <zefram@xxxxxxxxx>
- To: schaefer@xxxxxxxxxxxxxxxx (Bart Schaefer)
- Subject: Re: PATCH: pass name ($0) and zmult ($1) to user-defined widgets
- Date: Fri, 12 Jun 1998 10:37:48 +0100 (BST)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <980612013804.ZM20410@xxxxxxxxxxxxxxxxxxxxxxx> from "Bart Schaefer" at Jun 12, 98 01:38:04 am
Bart Schaefer wrote:
>User-defined widgets should be able to change their behavior or repeat
>their action when given a digit-argument.
Yes. But that should not be done via positional parameters. I have
deliberately avoided passing arguments in positional parameters, so
that one widget can reliably call another without having to fiddle with
the parameters. The numeric prefix should go into a special parameter,
or be accessible by some other mechanism.
> They also ought to have a
>usable $0 when FUNCTION_ARGZERO is set; I chose to pass the widget name,
>so if you bind the same function to different widgets you can test for
>$0 to tweak the behavior.
That's a good idea.
-zefram
Messages sorted by:
Reverse Date,
Date,
Thread,
Author