Skip to content

Commit c28a5df

Browse files
committed
docs(tools): Use {tool} role for tool-to-tool cross-references
why: The {tool} role renders links with colored safety badges, which is more informative in the tools section than plain {ref} links. what: - Replace {ref} with {tool} for 14 tool cross-references across panes.md (7), sessions.md (5), windows.md (2) - Keep {ref} for non-tool refs (e.g. configuration) - Cross-file links (panes→windows) render with correct badge colors
1 parent 4f6e509 commit c28a5df

3 files changed

Lines changed: 15 additions & 15 deletions

File tree

docs/tools/panes.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
after running a command, checking output, or verifying state.
1010

1111
**Avoid when** you need to search across multiple panes at once — use
12-
{ref}`search-panes`. If you only need pane metadata (not content), use
13-
{ref}`get-pane-info`.
12+
{tool}`search-panes`. If you only need pane metadata (not content), use
13+
{tool}`get-pane-info`.
1414

1515
**Side effects:** None. Readonly.
1616

@@ -51,7 +51,7 @@ $
5151
**Use when** you need pane dimensions, PID, current working directory, or
5252
other metadata without reading the terminal content.
5353

54-
**Avoid when** you need the actual text — use {ref}`capture-pane`.
54+
**Avoid when** you need the actual text — use {tool}`capture-pane`.
5555

5656
**Side effects:** None. Readonly.
5757

@@ -67,7 +67,7 @@ other metadata without reading the terminal content.
6767
which pane has an error, finding a running process, or checking output
6868
without knowing which pane to look in.
6969

70-
**Avoid when** you already know the target pane — use {ref}`capture-pane`
70+
**Avoid when** you already know the target pane — use {tool}`capture-pane`
7171
directly.
7272

7373
**Side effects:** None. Readonly.
@@ -116,7 +116,7 @@ Response:
116116
**Use when** you need to block until specific output appears — waiting for a
117117
server to start, a build to complete, or a prompt to return.
118118

119-
**Avoid when** you can poll with {ref}`capture-pane` instead, or if the
119+
**Avoid when** you can poll with {tool}`capture-pane` instead, or if the
120120
expected text may never appear (set a timeout).
121121

122122
**Side effects:** None. Readonly. Blocks until text appears or timeout.
@@ -160,7 +160,7 @@ Response:
160160
terminal. This is the primary way to execute commands in tmux panes.
161161

162162
**Avoid when** you need to run something and immediately capture the result —
163-
send keys first, then use {ref}`capture-pane` or {ref}`wait-for-text`.
163+
send keys first, then use {tool}`capture-pane` or {tool}`wait-for-text`.
164164

165165
**Side effects:** Sends keystrokes to the pane. If `enter` is true (default),
166166
the command executes.
@@ -230,7 +230,7 @@ Keys sent to pane %2
230230
**Use when** you're done with a specific terminal and want to remove it
231231
without affecting sibling panes.
232232

233-
**Avoid when** you want to remove the entire window — use {ref}`kill-window`.
233+
**Avoid when** you want to remove the entire window — use {tool}`kill-window`.
234234

235235
**Side effects:** Destroys the pane. Not reversible.
236236

docs/tools/sessions.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
**Use when** you need session names, IDs, or attached status before deciding
99
which session to target.
1010

11-
**Avoid when** you need window or pane details — use {ref}`list-windows` or
12-
{ref}`list-panes` instead.
11+
**Avoid when** you need window or pane details — use {tool}`list-windows` or
12+
{tool}`list-panes` instead.
1313

1414
**Side effects:** None. Readonly.
1515

@@ -47,7 +47,7 @@ Response:
4747
**Use when** you need to verify the tmux server is running, check its PID,
4848
or inspect server-level state before creating sessions.
4949

50-
**Avoid when** you only need session names — use {ref}`list-sessions`.
50+
**Avoid when** you only need session names — use {tool}`list-sessions`.
5151

5252
**Side effects:** None. Readonly.
5353

@@ -63,7 +63,7 @@ or inspect server-level state before creating sessions.
6363
container — create one before creating windows or panes.
6464

6565
**Avoid when** a session with the target name already exists — check with
66-
{ref}`list-sessions` first, or the command will fail.
66+
{tool}`list-sessions` first, or the command will fail.
6767

6868
**Side effects:** Creates a new tmux session. Attaches if `attach` is true.
6969

@@ -137,7 +137,7 @@ Response:
137137
**Use when** you're done with a workspace and want to clean up. Kills all
138138
windows and panes in the session.
139139

140-
**Avoid when** you only want to close one window — use {ref}`kill-window`.
140+
**Avoid when** you only want to close one window — use {tool}`kill-window`.
141141

142142
**Side effects:** Destroys the session and all its contents. Not reversible.
143143

@@ -152,7 +152,7 @@ windows and panes in the session.
152152
**Use when** you need to tear down the entire tmux server. This kills every
153153
session, window, and pane.
154154

155-
**Avoid when** you only need to remove one session — use {ref}`kill-session`.
155+
**Avoid when** you only need to remove one session — use {tool}`kill-session`.
156156

157157
**Side effects:** Destroys everything. Not reversible.
158158

docs/tools/windows.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
**Use when** you need window names, indices, or layout metadata within a
99
session before selecting a window to work with.
1010

11-
**Avoid when** you need pane-level detail — use {ref}`list-panes`.
11+
**Avoid when** you need pane-level detail — use {tool}`list-panes`.
1212

1313
**Side effects:** None. Readonly.
1414

@@ -199,7 +199,7 @@ Response:
199199

200200
**Use when** you're done with a window and all its panes.
201201

202-
**Avoid when** you only want to remove one pane — use {ref}`kill-pane`.
202+
**Avoid when** you only want to remove one pane — use {tool}`kill-pane`.
203203

204204
**Side effects:** Destroys the window and all its panes. Not reversible.
205205

0 commit comments

Comments
 (0)