Is there a way to erase only parts of the scrollback buffer of tmux? Or even go in and edit the text?
Background
I'm using a shell to build stuff, work interactively with commands and connect to my target system. This produces a lot of output mixed in with useful commands that I've typed. Some of this I'd like to keep, some I'd like to get rid of.
So I would for instance like to be able to:
- Remove many output lines that just clutters the output
- If I've done multiple attempts at a 'sed'/'awk' commands, and I'd like to keep only the ones that worked well. Or perhaps even add a comment next to it.
- Or go back and add a comment next to the commands. Or output lines.
Emacs shell buffer
This would be similar to I in a 'shell' buffer in Emacs can just go up in the buffer and remove previous output etc that I'm not interested in.
Note:
- I don't want to use e.g. 'clear-history' to clear the entire scrollback buffer, as I want to keep parts of it.
- I don't want to export the scrollback buffer and then edit the exported file, as I later want to be able just keep working in the tmux pane.