Skip to content

Commit fff6f4f

Browse files
committed
chore(cli[load]): Simplify
1 parent dfefd0a commit fff6f4f

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/tmuxp/cli/load.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -637,15 +637,14 @@ def command_load(
637637
return
638638

639639
last_idx = len(args.config_files) - 1
640-
original_options = tmux_options.copy()
640+
original_detached_option = tmux_options.pop("detached")
641+
original_new_session_name = tmux_options.pop("new_session_name")
641642

642643
for idx, config_file in enumerate(args.config_files):
643644
config_file = scan_config(config_file, config_dir=get_config_dir())
644645

645-
detached = tmux_options.pop("detached", original_options.get("detached", False))
646-
new_session_name = tmux_options.pop(
647-
"new_session_name", original_options.get("new_session_name")
648-
)
646+
detached = original_detached_option
647+
new_session_name = original_new_session_name
649648

650649
if last_idx > 0 and idx < last_idx:
651650
detached = True

0 commit comments

Comments
 (0)