最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

tmux - Remove parts of the content of the scrollback buffer - Stack Overflow

programmeradmin3浏览0评论

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.
发布评论

评论列表(0)

  1. 暂无评论