You are not logged in.
Pages: 1
Topic closed
Xyne's nooblog entry #453-J897X:
How do you clear the urxvt buffer? In Terminal, I used to use this alias: cls='reset && clear'
That would get rid of all output in the terminal, including previous off-screen lines.
Using the same alias in urxvt, I can still scroll up to see all previous output. I've also tried "tput reset" to no avail.
Just to be clear, I know that I can configure the number of lines that urxvt saves (I've set it to save 10000). I do not want to disable this feature completely. I just want to have control over it so that I can reset those lines easily.
Starting a new instance is not ideal either as I then lose the command history.
If it makes any difference, I'm using rxvt-unicode-256color from the AUR.
Last edited by Xyne (2009-05-21 19:29:40)
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Here with clear I can still scroll the lines up, I can't with reset, and the alias to 'reset && clear' is working as expected, I use urxvt from extra though.
Offline
Thanks for the reply, skualito.
After confirming that the package in extra behaves as expected, I added its configuration options to the PKGBUILD from the AUR. It seems to work as expected now.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Maybe I'm missing something, but this does not work for me using the package from extra. I was about to reply saying that it can't be done.
For me, I can only clear the buffer completely when the screen has never filled up in the first place. If it has already been forced to scroll down, it doesn't work.
Offline
#$#%%#^$%^$
You're right. I didn't fully test it... it just seemed to be working.
Why though? Why is this possible in other terminal emulators but not with urxvt?
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
I don't really know why. It does have a lot of options related to scrolling that I haven't fiddled with, though. One of them may fix it (let me know if does). Urxvt also has one major feature that other terminals don't... perl extensions. You could maybe write one to fix this behavior if it bothers you that much.
Offline
I tried filling up the screen , forcing it to scroll down, and then a reset or tput reset actually clears the screen, no scrollback possible, is there something I don't get ?
Edit: I just found this alias that "seems" to work for me
alias cls="echo -ne '\033c'"Is it working for others ?
Last edited by skualito (2009-05-21 18:25:12)
Offline
How do you normally scroll back?
I use the mouse wheel or Shift+PgUp (I've disabled scrollbars).
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
I also use Shift+PgUp without scrollbars, I confirm that I can not scroll back after a 'reset' or "echo -ne '\033c'"
Offline
I just fixed the problem for me by commenting out 'URxvt*termName: rxvt' in my ~/.Xdefaults file. (Doesn't work under screen, however.)
Last edited by fflarex (2009-05-21 18:46:44)
Offline
reset works fine here, too. (I'm using the urxvt from extra)
edit: BTW, I was wondering why C-L or clear don't work this days. I didn't know about reset.
Last edited by andre.ramaciotti (2009-05-21 19:25:35)
(lambda ())
Offline
alias cls="echo -ne '\033c'"
This seems to work for me. Thanks.
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
Edit: I just found this alias that "seems" to work for me
alias cls="echo -ne '\033c'"Is it working for others ?
Working great for me, thx.
Offline
Thanks for the tip.
In order to use it as a keybind (instead of a shell alias), I add
URxvt.keysym.C-k: echo -ne '\\033c'\nto my ~/.Xressources
Offline
Offline
Pages: 1
Topic closed