Skip to content

Commit b1657b9

Browse files
committed
docs: Cleanup for command examples
1 parent 915fd19 commit b1657b9

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ New session:
8888
'libtmux...:2.0'
8989
```
9090

91-
Time for some tech, direct to a rich, `Window` object:
91+
From raw command output, to a rich `Window` object (in practice and as shown
92+
later, you'd use `Session.new_window()`):
9293

9394
```python
9495
>>> Window.from_window_id(window_id=session.cmd('new-window', '-P', '-F#{window_id}').stdout[0], server=session.server)
@@ -102,7 +103,7 @@ Create a pane from a window:
102103
'%2'
103104
```
104105

105-
Magic, directly to a `Pane`:
106+
Raw output directly to a `Pane`:
106107

107108
```python
108109
>>> Pane.from_pane_id(pane_id=session.cmd('split-window', '-P', '-F#{pane_id}').stdout[0], server=session.server)

docs/quickstart.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ New session:
134134
'libtmux...:2.0'
135135
```
136136

137-
Time for some tech, direct to a rich, `Window` object:
137+
From raw command output, to a rich `Window` object (in practice and as shown
138+
later, you'd use {meth}`Session.new_window()`):
138139

139140
```python
140141
>>> Window.from_window_id(window_id=session.cmd('new-window', '-P', '-F#{window_id}').stdout[0], server=session.server)
@@ -148,7 +149,7 @@ Create a pane from a window:
148149
'%2'
149150
```
150151

151-
Magic, directly to a `Pane`:
152+
Raw output directly to a `Pane` (in practice, you'd use {meth}`Session.split_window()`):
152153

153154
```python
154155
>>> Pane.from_pane_id(pane_id=session.cmd('split-window', '-P', '-F#{pane_id}').stdout[0], server=session.server)

src/libtmux/server.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ def cmd(self, cmd: str, *args: t.Any) -> tmux_cmd:
189189
>>> session.cmd('new-window', '-P').stdout[0]
190190
'libtmux...:2.0'
191191
192-
Time for some tech, direct to a rich, `Window` object:
192+
Output of `tmux -L ... new-window -P -F#{window_id}` to a `Window` object:
193193
194194
>>> Window.from_window_id(window_id=session.cmd(
195195
... 'new-window', '-P', '-F#{window_id}').stdout[0], server=session.server)
@@ -200,7 +200,7 @@ def cmd(self, cmd: str, *args: t.Any) -> tmux_cmd:
200200
>>> window.cmd('split-window', '-P', '-F#{pane_id}').stdout[0]
201201
'%5'
202202
203-
Magic, directly to a `Pane`:
203+
Output of `tmux -L ... split-window -P -F#{pane_id}` to a `Pane` object:
204204
205205
>>> Pane.from_pane_id(pane_id=session.cmd(
206206
... 'split-window', '-P', '-F#{pane_id}').stdout[0], server=session.server)

0 commit comments

Comments
 (0)