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

Re: Why does zsh clear to end-of-screen after prompt?



On 8/27/23 3:34 AM, Roman Perepelitsa wrote:
An alternative solution is to embed the info in PROMPT. In order to
avoid wasting 20 lines of the TTY real estate on each command, you can
automatically contract the prompt before executing each command. Thus,
if you run `pwd` twice in a row, your TTY might look like this:

     me@box ~ % pwd
     /home/me
     me@box ~ % pwd
     /home/me

     foo=bar
     baz=qux
     me@box ~ % █

In this approach the extra info ("foo=bar", etc.) is always displayed
right above the current prompt. This is basically Transient Prompt
from Powerlevel10k
(https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/transient-prompt.gif)
but with a fatter prompt.

This looks like it might do something I've been contemplating doing. Having a prompt that is multiple lines but not taking up that screen real estate in history.

I need to reverse engineer this and adapt it to what I want to do.

I'd simply like a multi-line prompt that includes:
- A separation line from the rest of the screen, blank or repeating sequence is fine.
 - A line that includes path and similar things.
 - The actual command entry line.

I already have transient RPROMPT.

Time to read & understand what is happening.  :-)



Grant. . . .




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