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

Re: Read a line from user without clearing screen below the prompt while allowing user to use arrow keys to make edits in middle of line



Bart Schaefer wrote:
> If this is unsatisfactory, you could try using zcurses to manage the
> display, which I think would allow you to always redraw whatever vared
> erased.

The first idea that came into my mind was to try setopt singlelinezle
Unfortunately, that doesn't especially help. I think the clearing from
the cursor to the end of the window serves a purpose in general. It may
be that this could be relaxed for singlelinezle without breaking
anything. A script has control of anything like completion that
potentially results in further printing of characters.

Another option would be to provide zle with control of the text you want
to appear after the input by putting it in POSTDISPLAY:

  other-stuff() { POSTDISPLAY=$'\none\ntwo\nthree' }
  zle -N other-stuff
  vared -i other-stuff -c out


Oliver




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