Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Cursor save/restore is redrawing over existing output
On Thu, Dec 17, 2020 at 09:40:12PM -0800, Bart Schaefer wrote:
> The ZLE editor presumes that the prompt is always printed at the
> bottom of any output and clears the screen
Ah ha! Thank you, that makes total sense. And you're right -- if
I disable zle then the behavior matches Bash and sh. I haven't delved
into zle yet so I'll go through those docs now.
> Depending on why you're attempting to save and restore the cursor,
> there may be a ZLE-compatible way to accomplish what you want.
I'm experimenting with the (probably dumb) idea of only displaying the
output from a single command at a time for a rudimentary TUI-like-thing.
For example, if you type `ls` the directory listing appears below the
prompt as normal, but then the cursor returns to the original row and
clears the prompt so the next command you type, say `uptime`, outputs as
normal but also clears the directory listing output. The idea being that
you can run several commands in succession without moving the cursor or
scrolling the terminal.
Some of Zsh's completions have a similar look-and-feel to what I'm after
so that may be a better tree to bark up but for now I'm just
experimenting. That said, I'd very much appreciate any suggestions for
where else to look.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author