`source-file` does not take the same arguments as tmux version
trevorwhitney opened this issue · comments
It appears the source-file
function takes different arguments in tmate vs tmux. This is causing a problem as I use the -q
argument in my tmux config, so tmate errors when trying to load it.
From man tmate
:
source-file path
(alias: source)
Execute commands from path.
From man tmux
:
source-file [-nqv] path ...
(alias: source)
Execute commands from one or more files specified by path (which may be glob(7) patterns). If -q is given, no error will be returned if path does not exist. With -n, the file is parsed but no commands are executed. -v shows the parsed commands and line numbers if possible.
Versions of each:
$ tmate -V
tmate 2.4.0
$ tmux -V
tmux 3.1c
Is there a specific reason for this discrepancy?
I also stumbled over this problem. The problem seems to be that tmate
was forked before tmux v2.3
in which the source-file -q
option got introduced: tmux/tmux@fdd368a
tmate
'didn't catch up with tmux
' so a lot of key bindings fail with tmate
: #108, #272, ...
It also doesn't seem to be possible to use an alternative system configuration file: tmate
always loads /etc/tmux.conf
, even if -f
is given.
JFI, we currently work around this problem with something like this:
if-shell "! (env | grep -q TMUX=/tmp/tmate)" \
"source-file -q ~/.tmux.conf.local"