1

In my case clear actually deletes all onscreen output. What I want is a way to start off with a clear terminal while still having access to all prior output by scrolling up.

I use Kitty and Fish btw.

1 Answers1

3

You can use clear -x to preserve the scrollback buffer, or CTRL+L keypress.

You could e.g. alias something like cls to 'clear -x' so you have two commands available, to either clear the buffer or not.

Both these work in Kitty 0.76.1.13, when I use it to SSH into Bash (or Fish 3.0.2) on a Debian remote computer.