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

Re: clearing the screen without losing anything?



On Jan 16,  4:13pm, Andy Spiegl wrote:
}
} I was just wondering whether it's possible to clear the screen (with Ctrl-l)
} such that the screen contents is pushed into the terminal's (i.e. xterm)
} scrollback buffer.
} 
} Uhm, I am not even sure whether that's a zsh or xterm issue?

Some of each.  Ctrl-l (the clear-screen widget) is implemented by sending
the "clear screen" terminal control string; what the terminal does with
that is out of zsh's hands, but zsh doesn't have to send that string.

    clear-screen() { repeat $LINES print '' >/dev/tty ; zle -I }
    zle -N clear-screen



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