Hacker News new | past | comments | ask | show | jobs | submit login

Fwiw parent comment currently says exaggerative, not aggressive.

Why wouldn't you use "clear" for that, or Ctrl+L? "reset" does a lot more, you use it when you've accidentally written a binary to your terminal and triggered a bunch of terminal modes.

I guess clear wouldn't clear the scroll buffer, is that the main reason?




> I guess clear wouldn't clear the scroll buffer, is that the main reason?

Yes. See sibling replies.


I think that's a libvte pecularity (used among others by the Gnome and XFCE terminal emulators), which upon entering <clear> (or pressing CTRL+L) just scrolls up until the screen seems to be empty. Make sure you set terminfo correctly, ie. E3=ED3, so that it clears the text and scroll buffer.

On any non-libvte using terminal emulator, eg. xterm, you can use CTRL+L to clear the text area and ALT+CTRL+L to clear the text area and the scroll buffer.


My Gnome terminal only scrolls on CTRL+L or CTRL+ALT+L but it actually clears the buffer after the clear command.


Yay, another irregular behaviour! If you are interested in a history of weird behaviours, take a look at https://invisible-island.net/xterm/xterm.faq.html#bug_gnomet... ;)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: