GNU screen: how to clear scrollback and screen at once

前提是你 提交于 2019-12-08 07:56:45

问题


I'm looking for a way to clear both the scrollback and the visible screen at once in GNU screen. At the moment I use two separate bindings:

  • C-a, C (which is the default one for clearing the visible text)
  • bind _ eval "scrollback 0" "scrollback 15000" (which clears the scrollback)

Can someone point me to how I can do both in one?


回答1:


Turns out you can just do:

  bind _ eval "clear" "scrollback 0" "scrollback 15000"

Note that the order seems to matter: it doesn't seem to work every time if you have the "clear" at the end (it always clears the screen, but not always the scrollback).



来源:https://stackoverflow.com/questions/10932487/gnu-screen-how-to-clear-scrollback-and-screen-at-once

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!