Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: PATCH: re-expand the prompt automatically

Bart Schaefer wrote:
> On Fri, 2 Jul 2004, Peter Stephenson wrote:
> > Here's the tweak I just proposed to Wayne's patch
> So does this mean "zle reset-prompt" goes away again?  Or does it serve
> a different purpose?

Neither, really, because you still need some way of reexpanding the
prompt when you don't get an asynchronous event.  So it serves the
purpose it always did.

> (It would seem that, with this patch, "zle -I" can be used instead of 
> reset-prompt.

That's not quite true.  zle -I invalidates the display, redrawing the
prompt below.  So at the minimum you get a new line, whether or not the
prompt changed.  zle reset-prompt reexpands the prompt on the current
line.  This is much less intrusive.

> Further, it seems odd to make reset-prompt a built-in 
> widget rather than a zle option.)

I don't understand that.  How would the option know when to reexpand the
prompt?  Are you suggesting it be tied to zle -R or zle redisplay or
both?  (Probably the latter since the former is supposed just to make
the changes requested by widgets explicit rather than refresh the
display.)  Why is that more natural?

Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Work: pws@xxxxxxx
Web: http://www.pwstephenson.fsnet.co.uk

Messages sorted by: Reverse Date, Date, Thread, Author