Skip to content

Commit 59d170d

Browse files
committed
chore(cli[load]): SImplify
1 parent 8200b1b commit 59d170d

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
@@ -638,15 +638,14 @@ def command_load(
638638
return
639639

640640
last_idx = len(args.workspace_files) - 1
641-
original_options = tmux_options.copy()
641+
original_detached_option = tmux_options.pop("detached")
642+
original_new_session_name = tmux_options.pop("new_session_name")
642643

643644
for idx, workspace_file in enumerate(args.workspace_files):
644645
workspace_file = scan_config(workspace_file, config_dir=get_config_dir())
645646

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

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

0 commit comments

Comments
 (0)