Neither less
or less -X
clear screen on exit. At the same time, vim
does….
Env iTerm2, protocol mosh, server Centos + tmux + zsh
iTerm2: report term as xterm-256color
tmux: set -g terminal-overrides 'xterm*:smcup@:rmcup@'
, no change to alternate-screen
$TERM
is final set to screen-256color
I also tried
tput smcup | od -c
and
tput rmcup | od -c
suggested here. It outputs correct answer.
Best Answer
The issue is my
$LESS
contains-X
. Plus-+X
will setless
to it's default behavior, which is whatever is specified in$LESS
, NOT no-X
. Thus I was runningless
with-X
all the time. That's why neither cleaned the screen.