Hacker News new | ask | show | jobs
by benwaffle 826 days ago
I use it to clear my scrollback buffer. It makes it easier to search any new output.
1 comments

There’s probably a hot key in your terminal emulator to do that. Fewer buttons to press, so even quicker. ;)
Sadly there isn't on Linux. There is on Mac - Ctrl-K. But for some reason nobody on Linux has realised how useful it is. It's actually even better than `reset` because it works at any time.
I think you're conflating SHELL with TERM because the OS has nothing to do with what hot keys your terminal emulator supports (the OS wouldn't dictate hot keys available for shells either, but popular Linux distros don't tend to default to Zsh like macOS does).

A terminal emulator is the software application you use to bring the command prompt up. So a terminal emulator is operating system agnostic.

Granted there are some macOS only terms out there like iTerm2 and Apples own Terminal. Just as there are terminals that haven't (as far as I'm aware) been ported to macOS, like xterm. But there's plenty of cross platform terminal emulators too, in fact most are cross platform.

I'm not conflating anything. On Mac you can press Ctrl-K in any terminal emulator and it will clear the terminal and scrollback. On Linux no terminal emulators support this (except Kitty it turns out - as mentioned in the other comment).

Sadly Kitty is very bare-bones. Not really for me. And I can't choose to use Kitty in VSCode.

Konsole supports Ctrl+Shift+K by default, and you can change the keybinds. Don't confuse Gnome with Linux.
> Sadly Kitty is very bare-bones.

Care to elaborate? I had an impression that it's a pretty complete piece of software. I've been driving it daily for more than 1½ years, and I'm pretty happy with it.

Well the first two things I tried that are present in pretty much all software - scroll bar and Ctrl-F to find, did not exist. There's no menu bar at all in fact.
> I'm not conflating anything.

I said most terminal emulators are cross platform and that hot key isn't an OS dependant thing. You then reply with:

> On Mac you can press Ctrl-K in any terminal emulator ... > On Linux no terminal emulators support this

which not only contradicts what I said, it also misunderstands how terminal emulators work

> and I can't choose to use Kitty in VSCode.

So the issue is VSCode doesn't support ctrl+k? that's very different to the statement you opened with

alacritty supports scrollback clearing
Is this an instance of that meme where people insult Linux to get better technical advice?