Skip to content

Commit 746aff2

Browse files
committed
docs(fix[control-mode]): Clarify internal session naming
why: Align control-mode docs with the UUID-based internal session name and runnable examples. what: - Update CHANGES and control-mode docs to use libtmux_ctrl_XXXXXXXX naming - Fix the attach-session example to define a bootstrap Server
1 parent b21ad20 commit 746aff2

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

CHANGES

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ The following deprecations from 0.50.0 continue to emit {class}`DeprecationWarni
148148
- Internal control session is automatically filtered from `Server.sessions` /
149149
`Server.has_session()`; advanced users can inspect all sessions via
150150
`Server._sessions_all()`.
151-
- `ControlModeEngine` accepts `internal_session_name` (default `libtmux_control_mode`)
151+
- `ControlModeEngine` accepts `internal_session_name` (default `libtmux_ctrl_XXXXXXXX`)
152152
and `control_session` for advanced connection strategies.
153153

154154
Example:
@@ -191,7 +191,7 @@ for notif in engine.iter_notifications(timeout=0.1):
191191
### Compatibility
192192

193193
- Control mode internal session filtering is engine-driven; callers no longer need
194-
to manually exclude `libtmux_control_mode`. APIs stay unchanged; additional metadata
194+
to manually exclude `libtmux_ctrl_*`. APIs stay unchanged; additional metadata
195195
is attached for advanced users. (#605)
196196

197197
## libtmux 0.50.1 (2025-12-06)

docs/topics/control_mode.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ for notif in engine.iter_notifications(timeout=0.1):
4343

4444
:::{note}
4545
Control mode creates an internal session for connection management (default name:
46-
`libtmux_control_mode`). This session is automatically filtered from
46+
`libtmux_ctrl_XXXXXXXX`). This session is automatically filtered from
4747
`Server.sessions` and `Server.has_session()` to maintain engine transparency.
4848
:::
4949

@@ -97,8 +97,9 @@ For expert use cases, control mode can attach to an existing session instead of
9797
creating an internal one:
9898

9999
```python
100-
# Create a session first
101-
server.new_session("shared")
100+
# Create a session first (subprocess engine by default)
101+
bootstrap = Server()
102+
bootstrap.new_session("shared", attach=False)
102103

103104
# Control mode attaches to it for its connection
104105
engine = ControlModeEngine(control_session="shared")

0 commit comments

Comments
 (0)