Skip to content

Commit 29ca748

Browse files
committed
Load first configurations to the background
Only the last one will be attached if -d flag is not specified
1 parent 9b632a9 commit 29ca748

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tmuxp/cli.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,10 +399,17 @@ def command_load(args):
399399
"""Load a session from a tmuxp session file."""
400400

401401
if isinstance(args.config, list):
402-
for config in args.config:
402+
# Load each configuration but the last to the background
403+
for config in args.config[:-1]:
403404
new_args = argparse.Namespace(**args.__dict__)
405+
new_args.detached = True
404406
new_args.config = config
405407
command_load(new_args)
408+
409+
# The last one will be detached if specified on the command line
410+
new_args = argparse.Namespace(**args.__dict__)
411+
new_args.config = args.config[-1]
412+
command_load(new_args)
406413
return
407414

408415
if '.' == args.config:

0 commit comments

Comments
 (0)