5
1
This question is loosely related to this one.
So I am using a range of Tmux versions between 1.5 and 2.2 on various operating systems (and Linux distros).
My ~/.tmux.conf
which had been tailored to earlier versions shows the following three lines of warning on Tmux 2.2:
/home/username/.tmux.conf:34: unknown option: mode-mouse
/home/username/.tmux.conf:70: unknown option: status-utf8
/home/username/.tmux.conf:71: unknown option: utf8
A cursory look into the man
page suggests that these configuration options have been discontinued. However, instead of silently ignoring them, Tmux complains about the "unknown" options.
The lines corresponding to the above warnings are:
set-window-option -g mode-mouse off
set-option -g status-utf8 on
set-window-option -g utf8 on
The option mode-mouse
was discontinued in Tmux 2.1, status-utf8
and utf8
were discontinued in Tmux 2.2. The CHANGES
file in the source tree details the options that have been removed, along with a brief description.
Is there a method by which I can suppress this output? Better yet, is it perhaps possible to conditionally execute configuration file stanzas based on the Tmux version without separate configuration file snippets (which would have to be source
-d)?
In short: what's the straightforward way to use the exact same .tmux.conf
across multiple Tmux versions?
Rationale: the reason this bothers me is that Tmux will show these warnings whenever a session gets started. And the it takes an action on my part (pressing a key) to get dropped into the shell. However, on older Tmux versions I do not have the problems, but I'd like to set the respective options on these older Tmux versions.
From the old man
page:
status-utf8 [on | off]
Instruct tmux to treat top-bit-set characters in the status-left and status-right strings as UTF-8; notably, this is important for wide characters. This option defaults to off.
and:
utf8 [on | off]
Instructs tmux to expect UTF-8 sequences to appear in this window.
When it comes to Debian, I prefer just installing 2.2 from jessie-backports. Surprised that some distros still have 1.5 though. – user1686 – 2016-04-26T10:55:26.617
@grawity: it's not necessarily the distro (also, I am not just using Linux), but also the fact that I do not have superuser everywhere, so it makes it impossible to build and install my own (new and compatible) Tmux. Some of these systems are intentionally kept without updates, for others it's probably negligence :) – 0xC0000022L – 2016-04-26T10:58:11.387