[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: command to clear screen buffer?
From: |
Konstantin Svist |
Subject: |
Re: command to clear screen buffer? |
Date: |
Sat, 27 Apr 2013 15:58:14 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130402 Thunderbird/17.0.5 |
On 04/27/2013 02:20 PM, Chris Jones wrote:
> On Sat, Apr 27, 2013 at 02:07:35PM EDT, Konstantin Svist wrote:
>
> [..]
>
>> Can that be made into a shortcut?
> As suggested in the addendum above you could bind the command sequence
> to a key.
>
> One way to do this would be to stick the two commands in a file:
>
> | $ cat $HOME/.scrbuff_screenrc
> | scrollback 0
> | scrollback 500
>
> And add something like this to your $HOME/.screenrc
>
> | bind 9 source $HOME/scrbuff_screenrc
>
> You would then be able to hit 'CTRL-A 9' to clear the contents of the
> scrollback buffer for the current screen window and reset it to a sane
> value (here 500 lines).
>
> I'm sure there are more elegant ways to do this, using a gnu/screen
> registers for instance, but I wouldn't know the exact syntax off the top
> of my head.
>
> By 'elegant' I mean a solution that lets you stick everything in your
> .screenrc and avoid the clumsy extra file.
>
> CJ
>
perfect! :)