Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PS1 or PS2
- X-seq: zsh-workers 6927
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>, "Sven Wischnowsky" <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>, <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Re: PS1 or PS2
- Date: Tue, 29 Jun 1999 15:24:31 +0000
- In-reply-to: <001901bec230$a7675b60$21c9ca95@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <001901bec230$a7675b60$21c9ca95@xxxxxxxxxxxxxx>
On Jun 29, 5:09pm, Andrej Borsenkow wrote:
} Subject: RE: PS1 or PS2
}
} >
} > 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> }
}
} After zle .push-line-or-edit both BUFFER and PREBUFFER are empty. Are they
} static values computed on the entry into widget or do they reflect real ZLE
} buffers?
I think they reflect real ZLE buffers. The "problem" is with the way that
push-input/get-line (and consequently push-line-or-edit) are implemented:
They do something similar to
print -z "$BUFFER"
BUFFER=""
and then wait for zle_refresh() to come around and yank the buffer back.
So if you're entirely inside a zle widget (or a bindkey -s), you can't do
anything to the pushed input; it simply isn't there anymore until zsh has
a chance to print a prompt again.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author