2

I've removed and added a few times now the following line to ~/.tmux.conf:

set -ga terminal-overrides ',xterm*:smcup@:rmcup@'

Which according to the person who provided it does the following:

to fool the multiplexers into thinking that the terminal has no "alternate screen" mode (such as that used by pico, mutt, etc). This is accomplished by setting termcap commands for the session.

The 'xterm*' part of the command should be set to whatever your terminal-emulator is declared as.

The end result is that the overflow ends up in the terminal's scrollback buffer instead of disappearing. Of course, since this is one static buffer, things will get messy as you switch between screen or tmux windows, but this is handy for quickly flicking up to see the output of an ls command or the such.

I don't quite understand the bolded section (emphasis added), but guess this is the source of what I'm seeing. It's causing some weird sort of unicode overspill upon exiting tmux.

enter image description here

Pasted as plaintext this text won't show up, but the symbol [001B]112 appears alongside the usual [exited]:

]112[exited]

(FWIW I think it has pasted in that line, but isn't displaying)

I followed this advice ("Use terminal scrollbar with tmux"), and while it does work, this is just ugly/annoying to see that upon exiting. Can anyone advise how to fix or avoid the output message?

Community
  • 1
  • 1
Louis Maddox
  • 5,226
  • 5
  • 36
  • 66

2 Answers2

2

Offhand, I would get the unwanted "message" is some hard-coded application (or script) which is helpfully resetting the xterm dynamic text cursor color. See XTerm Control Sequences in the description of Operating System Controls:

      The dynamic colors can also be reset to their default
      (resource) values:
...
        Ps = 1 1 2  -> Reset text cursor color.

So... somewhere there is some script doing the equivalent of

echo -n -e '\e]112\a

The results probably depend most on what particular terminal emulator you are using. Both screen and tmux filter out escape sequences that their developers did not care to implement, and pass through those that the terminal "should" handle.

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
2

Just take a look at sentence you provided: "The 'xterm*' part of the command should be set to whatever your terminal-emulator is declared as."

In my case, the $TERM has value xterm-256color and the corresponding line in ~/.tmux.conf looks like:

set -g terminal-overrides "xterm-color256:smcup@:rmcup@"