@@ -40,7 +40,7 @@ class OptionOverrides(TypedDict):
4040
4141
4242class CLILoadNamespace (argparse .Namespace ):
43- config_files : t .List [str ]
43+ workspace_files : t .List [str ]
4444 socket_name : t .Optional [str ]
4545 socket_path : t .Optional [str ]
4646 tmux_config_file : t .Optional [str ]
@@ -256,7 +256,7 @@ def _setup_plugins(builder: WorkspaceBuilder) -> Session:
256256
257257
258258def load_workspace (
259- config_file : StrPath ,
259+ workspace_file : StrPath ,
260260 socket_name : t .Optional [str ] = None ,
261261 socket_path : None = None ,
262262 tmux_config_file : None = None ,
@@ -271,7 +271,7 @@ def load_workspace(
271271
272272 Parameters
273273 ----------
274- config_file : list of str
274+ workspace_file : list of str
275275 paths or session names to workspace files
276276 socket_name : str, optional
277277 ``tmux -L <socket-name>``
@@ -361,18 +361,19 @@ def load_workspace(
361361 Accessed April 8th, 2018.
362362 """
363363 # get the canonical path, eliminating any symlinks
364- if isinstance (config_file , (str , os .PathLike )):
365- config_file = pathlib .Path (config_file )
364+ if isinstance (workspace_file , (str , os .PathLike )):
365+ workspace_file = pathlib .Path (workspace_file )
366366
367367 tmuxp_echo (
368- style ("[Loading] " , fg = "green" ) + style (str (config_file ), fg = "blue" , bold = True )
368+ style ("[Loading] " , fg = "green" )
369+ + style (str (workspace_file ), fg = "blue" , bold = True )
369370 )
370371
371372 # ConfigReader allows us to open a yaml or json file as a dict
372- raw_config = config_reader .ConfigReader ._from_file (config_file ) or {}
373+ raw_config = config_reader .ConfigReader ._from_file (workspace_file ) or {}
373374
374375 # shapes configurations relative to config / profile file location
375- sconfig = config .expand (raw_config , cwd = os .path .dirname (config_file ))
376+ sconfig = config .expand (raw_config , cwd = os .path .dirname (workspace_file ))
376377 # Overwrite session name
377378 if new_session_name :
378379 sconfig ["session_name" ] = new_session_name
@@ -382,7 +383,7 @@ def load_workspace(
382383 t = Server ( # create tmux server object
383384 socket_name = socket_name ,
384385 socket_path = socket_path ,
385- config_file = tmux_config_file ,
386+ workspace_file = tmux_config_file ,
386387 colors = colors ,
387388 )
388389
@@ -393,7 +394,7 @@ def load_workspace(
393394 sconf = sconfig , plugins = load_plugins (sconfig ), server = t
394395 )
395396 except exc .EmptyConfigException :
396- tmuxp_echo ("%s is empty or parsed no config data" % config_file )
397+ tmuxp_echo ("%s is empty or parsed no config data" % workspace_file )
397398 return None
398399
399400 session_name = sconfig ["session_name" ]
@@ -468,7 +469,7 @@ def load_workspace(
468469 return _setup_plugins (builder )
469470
470471
471- def config_file_completion (ctx , params , incomplete ):
472+ def workspace_file_completion (ctx , params , incomplete ):
472473 config_dir = pathlib .Path (get_config_dir ())
473474 choices : t .List [pathlib .Path ] = []
474475
@@ -491,8 +492,8 @@ def config_file_completion(ctx, params, incomplete):
491492
492493
493494def create_load_subparser (parser : argparse .ArgumentParser ) -> argparse .ArgumentParser :
494- config_files = parser .add_argument (
495- "config_files " ,
495+ workspace_files = parser .add_argument (
496+ "workspace_files " ,
496497 nargs = "+" ,
497498 metavar = "config-file" ,
498499 help = "filepath to session or filename of session if in tmuxp config directory" ,
@@ -574,7 +575,7 @@ def create_load_subparser(parser: argparse.ArgumentParser) -> argparse.ArgumentP
574575 try :
575576 import shtab
576577
577- config_files .complete = shtab .FILE # type: ignore
578+ workspace_files .complete = shtab .FILE # type: ignore
578579 tmux_config_file .complete = shtab .FILE # type: ignore
579580 log_file .complete = shtab .FILE # type: ignore
580581 except ImportError :
@@ -629,19 +630,19 @@ def command_load(
629630 "append" : args .append ,
630631 }
631632
632- if args .config_files is None or len (args .config_files ) == 0 :
633+ if args .workspace_files is None or len (args .workspace_files ) == 0 :
633634 tmuxp_echo ("Enter at least one config" )
634635 if parser is not None :
635636 parser .print_help ()
636637 sys .exit ()
637638 return
638639
639- last_idx = len (args .config_files ) - 1
640+ last_idx = len (args .workspace_files ) - 1
640641 original_detached_option = tmux_options .pop ("detached" )
641642 original_new_session_name = tmux_options .pop ("new_session_name" )
642643
643- for idx , config_file in enumerate (args .config_files ):
644- config_file = scan_config (config_file , config_dir = get_config_dir ())
644+ for idx , workspace_file in enumerate (args .workspace_files ):
645+ workspace_file = scan_config (workspace_file , config_dir = get_config_dir ())
645646
646647 detached = original_detached_option
647648 new_session_name = original_new_session_name
@@ -651,7 +652,7 @@ def command_load(
651652 new_session_name = None
652653
653654 load_workspace (
654- config_file ,
655+ workspace_file ,
655656 detached = detached ,
656657 new_session_name = new_session_name ,
657658 ** tmux_options ,
0 commit comments