Bug 481249

Summary: "reset" doesn't clear scrollback
Product: [Applications] konsole Reporter: Ellie <el>
Component: emulationAssignee: Konsole Developer <konsole-devel>
Status: RESOLVED NOT A BUG    
Severity: wishlist CC: ninjalj
Priority: NOR    
Version: 23.08.4   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Ellie 2024-02-12 01:44:19 UTC
SUMMARY

On GNOME Terminal, "reset" clears the scrollback. Sadly on KDE's Konsole it doesn't. The reason this is useful is e.g. before running a new command or a series of commands where you plan to later save/export the entire scrollback for sharing to e.g. report bugs or document how to do something. Also, quite often before I run a command where I expect output, I want to be able to afterward jump to the beginning of the output. Both are way easier when clearing the terminal *and* the scrollback first, so this is a fairly useful action for that. It would be nice if "reset" did that.

STEPS TO REPRODUCE

1. Use some command like "dmesg" that produces output beyond what fits into your terminal window
2. Type "reset"
3. Try to scroll up

OBSERVED RESULT

Scrollback remains after "reset, which can be undesirable for a number of use cases (see above) and it's inconsistent with GNOME Terminal.

EXPECTED RESULT

Scrollback is cleared after "reset".

SOFTWARE/OS VERSIONS

Windows: 
macOS: 
Linux/KDE Plasma: openSUSE Slowroll 
(available in About System)
KDE Plasma Version: 5.27.10
KDE Frameworks Version: Version 5.113.0
Qt Version: 5.15.11 (built against 5.15.11)

ADDITIONAL INFORMATION
Comment 1 Ellie 2024-02-21 12:02:38 UTC
This might seem weird but this almost makes konsole unusable to me. Dozens to hundreds of times a day I type "reset" to be able to examine what I run next in isolation to see its full output, scroll up, and I realize I again forgot to clear the scrollback and can't immediately find where the output of it starts.

Is there a workaround for this available maybe?
Comment 2 ninjalj 2024-02-24 22:44:12 UTC
"clear" from ncurses by default  clears the scrollback. Another option would be to use the "Clear Scrollback and Reset" action, which by default is bound to the "Ctrl+Shift+K" keyboard shortcut.
Comment 3 Ellie 2024-02-25 00:55:56 UTC
That's super cool, thanks for letting me know! I'm using this in my .bashrc now:

    alias reset='reset && clear'

I guess there's probably just no agreed way to do terminal resets across Gnome and KDE then and won't ever be? I feel like it would be better for everyone's muscle memory to share the same default behavior here, but maybe that's just not realistically going to happen.