Skip to content

Commit 1ce725f

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

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tmuxp/cli.py

+5-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,7 @@ 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, config_file=tmux_config_file, colors=colors
667668
)
668669

669670
which('tmux') # raise exception if tmux not found
@@ -996,6 +997,7 @@ def command_freeze(session_name, socket_name, socket_path, force):
996997
@click.argument('config', type=ConfigPath(exists=True), nargs=-1)
997998
@click.option('-S', 'socket_path', help='pass-through for tmux -S')
998999
@click.option('-L', 'socket_name', help='pass-through for tmux -L')
1000+
@click.option('-f', 'tmux_config_file', help='pass-through for tmux -f')
9991001
@click.option('-s', 'new_session_name', help='start new session with new session name')
10001002
@click.option('--yes', '-y', 'answer_yes', help='yes', is_flag=True)
10011003
@click.option(
@@ -1026,6 +1028,7 @@ def command_load(
10261028
config,
10271029
socket_name,
10281030
socket_path,
1031+
tmux_config_file,
10291032
new_session_name,
10301033
answer_yes,
10311034
detached,
@@ -1064,6 +1067,7 @@ def command_load(
10641067
tmux_options = {
10651068
'socket_name': socket_name,
10661069
'socket_path': socket_path,
1070+
'tmux_config_file': tmux_config_file,
10671071
'new_session_name': new_session_name,
10681072
'answer_yes': answer_yes,
10691073
'colors': colors,

0 commit comments

Comments
 (0)