Skip to content

Commit ee8c6e2

Browse files
authored
Support tmux -f option (#665)
Fixes #654. `libtmux.server.Server` already supports a `config` option, so extend the option to the `tmuxp load` command line.
1 parent 7bb97ec commit ee8c6e2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tmuxp/cli.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,7 @@ def load_workspace(
544544
config_file,
545545
socket_name=None,
546546
socket_path=None,
547+
tmux_config_file=None,
547548
new_session_name=None,
548549
colors=None,
549550
detached=False,
@@ -663,7 +664,8 @@ def load_workspace(
663664
sconfig = config.trickle(sconfig)
664665

665666
t = Server( # create tmux server object
666-
socket_name=socket_name, socket_path=socket_path, colors=colors
667+
socket_name=socket_name, socket_path=socket_path,
668+
config_file=tmux_config_file, colors=colors,
667669
)
668670

669671
which('tmux') # raise exception if tmux not found
@@ -996,6 +998,7 @@ def command_freeze(session_name, socket_name, socket_path, force):
996998
@click.argument('config', type=ConfigPath(exists=True), nargs=-1)
997999
@click.option('-S', 'socket_path', help='pass-through for tmux -S')
9981000
@click.option('-L', 'socket_name', help='pass-through for tmux -L')
1001+
@click.option('-f', 'tmux_config_file', help='pass-through for tmux -f')
9991002
@click.option('-s', 'new_session_name', help='start new session with new session name')
10001003
@click.option('--yes', '-y', 'answer_yes', help='yes', is_flag=True)
10011004
@click.option(
@@ -1026,6 +1029,7 @@ def command_load(
10261029
config,
10271030
socket_name,
10281031
socket_path,
1032+
tmux_config_file,
10291033
new_session_name,
10301034
answer_yes,
10311035
detached,
@@ -1064,6 +1068,7 @@ def command_load(
10641068
tmux_options = {
10651069
'socket_name': socket_name,
10661070
'socket_path': socket_path,
1071+
'tmux_config_file': tmux_config_file,
10671072
'new_session_name': new_session_name,
10681073
'answer_yes': answer_yes,
10691074
'colors': colors,

0 commit comments

Comments
 (0)