Skip to content

Commit 0ee982b

Browse files
committed
Pane,Window(fix[respawn]): use fused -c flag format for consistency
why: The pane/window split() and new_window() methods use the fused form (f"-c{path}",) for the start-directory flag. The respawn methods used the separated form ("-c", str(path)), diverging from the dominant pattern in pane/window code. what: - Change Pane.respawn -c from ("-c", str(start_path)) to (f"-c{start_path}",) - Change Window.respawn -c from ("-c", str(start_path)) to (f"-c{start_path}",)
1 parent 015fdd4 commit 0ee982b

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

src/libtmux/pane.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1703,7 +1703,7 @@ def respawn(
17031703

17041704
if start_directory is not None:
17051705
start_path = pathlib.Path(start_directory).expanduser()
1706-
tmux_args += ("-c", str(start_path))
1706+
tmux_args += (f"-c{start_path}",)
17071707

17081708
if environment:
17091709
for k, v in environment.items():

src/libtmux/window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -761,7 +761,7 @@ def respawn(
761761

762762
if start_directory is not None:
763763
start_path = pathlib.Path(start_directory).expanduser()
764-
tmux_args += ("-c", str(start_path))
764+
tmux_args += (f"-c{start_path}",)
765765

766766
if environment:
767767
for k, v in environment.items():

0 commit comments

Comments
 (0)