@@ -395,6 +395,7 @@ def load_workspace(
395
395
config_file ,
396
396
socket_name = None ,
397
397
socket_path = None ,
398
+ tmux_config_file = None ,
398
399
colors = None ,
399
400
detached = False ,
400
401
answer_yes = False ,
@@ -410,6 +411,8 @@ def load_workspace(
410
411
``tmux -L <socket-name>``
411
412
socket_path: str, optional
412
413
``tmux -S <socket-path>``
414
+ tmux_config_file: str, optional
415
+ ``tmux -f <config-file>``
413
416
colors : str, optional
414
417
'-2'
415
418
Force tmux to support 256 colors
@@ -498,7 +501,10 @@ def load_workspace(
498
501
sconfig = config .trickle (sconfig )
499
502
500
503
t = Server ( # create tmux server object
501
- socket_name = socket_name , socket_path = socket_path , colors = colors
504
+ socket_name = socket_name ,
505
+ socket_path = socket_path ,
506
+ colors = colors ,
507
+ config_file = tmux_config_file ,
502
508
)
503
509
504
510
which ('tmux' ) # raise exception if tmux not found
@@ -742,6 +748,7 @@ def command_freeze(session_name, socket_name, socket_path):
742
748
@click .argument ('config' , type = ConfigPath (exists = True ), nargs = - 1 )
743
749
@click .option ('-S' , 'socket_path' , help = 'pass-through for tmux -S' )
744
750
@click .option ('-L' , 'socket_name' , help = 'pass-through for tmux -L' )
751
+ @click .option ('-f' , 'tmux_config_file' , help = 'pass-through for tmux -f' )
745
752
@click .option ('--yes' , '-y' , 'answer_yes' , help = 'yes' , is_flag = True )
746
753
@click .option (
747
754
'-d' , 'detached' , help = 'Load the session without attaching it' , is_flag = True
@@ -759,7 +766,7 @@ def command_freeze(session_name, socket_name, socket_path):
759
766
flag_value = 88 ,
760
767
help = 'Like -2, but indicates that the terminal supports 88 colours.' ,
761
768
)
762
- def command_load (ctx , config , socket_name , socket_path , answer_yes , detached , colors ):
769
+ def command_load (ctx , config , socket_name , socket_path , tmux_config_file , answer_yes , detached , colors ):
763
770
"""Load a tmux workspace from each CONFIG.
764
771
765
772
CONFIG is a specifier for a configuration file.
@@ -787,6 +794,7 @@ def command_load(ctx, config, socket_name, socket_path, answer_yes, detached, co
787
794
tmux_options = {
788
795
'socket_name' : socket_name ,
789
796
'socket_path' : socket_path ,
797
+ 'tmux_config_file' : tmux_config_file ,
790
798
'answer_yes' : answer_yes ,
791
799
'colors' : colors ,
792
800
'detached' : detached ,
0 commit comments