Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

source-file does not take the same arguments as tmux version #253

Open
trevorwhitney opened this issue Sep 7, 2021 · 2 comments
Open

source-file does not take the same arguments as tmux version #253

trevorwhitney opened this issue Sep 7, 2021 · 2 comments

Comments

@trevorwhitney
Copy link

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?

@jkirk
Copy link

jkirk commented Nov 16, 2022

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.

@jkirk
Copy link

jkirk commented Dec 6, 2022

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"

See: grml/grml-etc-core@a4aa1466

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants