Zsh Mailing List Archive
Messages sorted by:
zle_line_init_functions (Re: accept-line-and-down-history and push-input)
- X-seq: zsh-workers 28369
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: zle_line_init_functions (Re: accept-line-and-down-history and push-input)
- Date: Tue, 26 Oct 2010 22:01:02 -0700
- In-reply-to: <20101026161947.19279c58@xxxxxxxxxxxxxxxxxxxxxxxxx>
- List-help: <mailto:firstname.lastname@example.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:email@example.com>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <AANLkTin4qeNKcBt_TDzY2xt-XJ6aHVH257FOa6iriPSm@xxxxxxxxxxxxxx> <101026075546.ZM28500@xxxxxxxxxxxxxxxxxxxxxx> <20101026161947.19279c58@xxxxxxxxxxxxxxxxxxxxxxxxx>
On Oct 26, 4:19pm, Peter Stephenson wrote:
} Subject: Re: accept-line-and-down-history and push-input
} On Tue, 26 Oct 2010 07:55:44 -0700
} Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
} > (I'm beginning to think that zle-line-init should be a builtin widget
} > that calls an array of hook functions, ala precmd.)
} I've been thinking along those lines, except that the array of hook
} functions would be the alternative to the widget, as with chpwd and
I don't much like the idea of having an array of *widget names*.
What's the benefit of invoking a series of widgets, rather than
having one widget that calls a series of functions? The context is
the same either way (i.e., "zle" with no args returns zero status
and you can access all the line editor variables) and all the work
of creating and destroying thingys can be avoided.
} i.e. you could still define zle-line-init if you wanted a
} simple life but zle_line_init_functions could contain an additional set
} of widgets.
Wouldn't you still get that effect if zle-line-init was a builtin
widget that you could override with your own via zle -N ?
} Not sure how to keep the name of the array entirely within zle
I don't know what you're reaching for, there. The array has to be
outside of zle at some point or you can't assign anything to it ...?
for f in $zle_line_init_functions
if [[ $PWS_users_15493 ]]
then zle "$f"
elif [[ $my_suggestion ]]
then "$f" || break
Messages sorted by: