Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Some help neede :-) RE: PS1 or PS2
- X-seq: zsh-workers 7012
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>, "Sven Wischnowsky" <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>, <zsh-workers@xxxxxxxxxxxxxx>
- Subject: Some help neede :-) RE: PS1 or PS2
- Date: Wed, 7 Jul 1999 17:34:49 +0400
- Importance: Normal
- In-reply-to: <990629152431.ZM21113@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
>
> 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.
>
Yes, something like it. Currently I managed it so far, that it does redisplay a
line ... with a small problem :-(
Looking in pushlineoredit() I found, that it unconditionally set both
``errflag'' (why?) and ``done''. Obviously, this confused Zle (but I do not know
why). I thought, that I could pass parameter that says "do not set them" - and
here you are! now my small widget really redisplays the input:
(($#PREBUFFER)) && {
zle .push-line-or-edit bla-bla-bla
zle .get-line
zle -R
}
with the sad problem, that it still thinks it is on PS2 and won't return to PS1
(even if I press ^L to redisplay the whole). That is, after
bor@itsrm2:~%> {
cursh> ESC-x foo-widget
I get the following display
bor@itsrm2:~%> {
cursh> {
<= cursor here
and after ^L I get
cursh> {
<= cursor here
Unforunately, here I am lost. I tried it with vanilla push-input/get-line with
the same effect. Obviously, all of them just rely on zleread() to do the work
... sigh.
/andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author