问题
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