Target the tmux session as =<session>: for its @loop-root option, which set-option and show-options read as a pane's target
CI / tests (pull_request) Successful in 2m57s
CI / tests (pull_request) Successful in 2m57s
This commit is contained in:
@@ -75,7 +75,8 @@ def start_window(window: Window, cwd: str, env: typing.Mapping[str, str], comman
|
||||
if done.returncode:
|
||||
return Failure(f"tmux could not start the window {window.target}: {done.stderr.strip() or f'it exited {done.returncode}'}")
|
||||
if first:
|
||||
run(["set-option", "-t", f"={window.session}", OWNER, cwd])
|
||||
# set-option and show-options read a target as a pane's, so `=session` alone names no session.
|
||||
run(["set-option", "-t", f"={window.session}:", OWNER, cwd])
|
||||
# By the ID, since a window of the same name may still be closing. A loop that fails before the option is set closes its window, and its stop is still sent as a DM.
|
||||
run(["set-option", "-w", "-t", done.stdout.strip(), "remain-on-exit", "failed"])
|
||||
return None
|
||||
@@ -83,7 +84,7 @@ def start_window(window: Window, cwd: str, env: typing.Mapping[str, str], comman
|
||||
|
||||
def owner(session: str, run: Tmux) -> str:
|
||||
"""The checkout whose chunks session runs, as OWNER names it; empty where it names none."""
|
||||
return run(["show-options", "-qv", "-t", f"={session}", OWNER]).stdout.strip()
|
||||
return run(["show-options", "-qv", "-t", f"={session}:", OWNER]).stdout.strip()
|
||||
|
||||
|
||||
def close(window: Listed, run: Tmux) -> None:
|
||||
|
||||
Reference in New Issue
Block a user