Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: PS1 or PS2
- X-seq: zsh-workers 6915
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: "Sven Wischnowsky" <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>, <zsh-workers@xxxxxxxxxxxxxx>
- Subject: RE: PS1 or PS2
- Date: Tue, 29 Jun 1999 15:41:14 +0400
- Importance: Normal
- In-reply-to: <199906291116.NAA20175@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
> >
> > would do quite nicely ... but how can I find out (in user defined
> widget) that I
> > am on PS2? The info is available (push-line-or-edit has it) - is it
> possible to
> > make it available to user widgets as well?
>
> I haven't tried, but [[ -z "$PREBUFFER" ]] should work.
>
It almost works ...
bor@itsrm2:~%> _Fn-up-line-or-history () {
function> [[ -n "$PREBUFFER" ]] && zle .push-line-or-edit
function> zle .up-line-or-history
function> }
bor@itsrm2:~%> zle -N up-line-or-history _Fn-up-line-or-history
bor@itsrm2:~%> while true
while> <CursorUp>
beeps and I get
bor@itsrm2:~%> while true
<<< cursor here
That is, zle .up-line-or-history seems to be never executed.
/andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author