SUMMARY `printf "\ec"` does not clear the previous lines, they are simply hidden. STEPS TO REPRODUCE 1. open konsole 2. type ENTER as long a necessary to have the scollbars displayed 3. type `printf "\ec"` OBSERVED RESULT It is still possible to see the previous prompts EXPECTED RESULT it should not be possibke scroll back
This behavior (I am not sure it is a bug), is the result of https://invent.kde.org/utilities/konsole/-/merge_requests/589 reset() uses scrollUp(0, _cuY) to clear the screen, which after this commit saves all lines to the scroll back buffer. In the current development branch, the screen is cleared by clearEntireScreen() instead, so the behavior is more similar to the old behavior (tough not exactly the same).
maybe is there another command that does it right ? actually I use `printf "\ec"` because it's easy to remember.
clear from the ncurses package by default clears the screen and the scrollback buffer.