how to prevent clear screen after less or more commands under tmux?

salam4ik

Member

Reaction score: 2
Messages: 21

Hi to all!
How to prevent clearing screen after less or more commands under tmux? I noticed that in terminal without tmux it works. And in man I have found nothing about it:-(
Thank you for your help!
 

phoenix

Administrator
Staff member
Administrator
Moderator

Reaction score: 1,290
Messages: 4,099

You've changed the defaults somewhere.

The default behaviour of the more(1) command is to not clear the screen. Same for less(1) (since they're actually the same binary, on FreeBSD).

Check if you have $LESS defined anywhere in your shell startup scripts.

Double-check your tmux settings as well.
 

graudeejs

Son of Beastie

Reaction score: 707
Messages: 4,617

if you're using urxvt in ~/.Xdefaults i think you need to remove URxvt*buffered: true

That is if you have it
 
OP
salam4ik

salam4ik

Member

Reaction score: 2
Messages: 21

Thank you guys for reply!
I have found solution, the screen clearing can be prevent by command below:
Code:
set-window-option -g alternate-screen off
And now it works properly.
 
OP
salam4ik

salam4ik

Member

Reaction score: 2
Messages: 21

It is tmux command, that can run from tmux command prompt or from tmux.conf file.
 

fronclynne

Daemon

Reaction score: 179
Messages: 1,296

I must say, I'd just learned to accept that it worked that way, thanks for the research, salam4ik.
 
Top