@@ -139,15 +139,15 @@ We can list sessions with {meth}`Server.list_sessions`:
139139
140140``` python
141141>> > server.list_sessions()
142- [Session($ ... ... ), Session($ ... ... )]
142+ [Session($ 1 ... ), Session($ 0 ... )]
143143```
144144
145145This returns a list of {class}` Session ` objects you can grab. We can
146146find our current session with:
147147
148148``` python
149149>> > server.list_sessions()[0 ]
150- Session($ ... ... )
150+ Session($ 1 ... )
151151```
152152
153153However, this isn't guaranteed, libtmux works against current tmux information, the
@@ -162,7 +162,7 @@ tmux sessions use the `$[0-9]` convention as a way to identify sessions.
162162
163163``` python
164164>> > server.get_by_id(' $1' )
165- Session($ ... ... )
165+ Session($ 1 ... )
166166```
167167
168168You may ` session = server.get_by_id('$<yourId>') ` to use the session object.
@@ -172,10 +172,10 @@ You may `session = server.get_by_id('$<yourId>')` to use the session object.
172172``` python
173173# Just for setting up the example:
174174>> > server.sessions[0 ].rename_session(' foo' )
175- Session($ ... foo)
175+ Session($ 1 foo)
176176
177177>> > server.find_where({ " session_name" : " foo" })
178- Session($ ... foo)
178+ Session($ 1 foo)
179179```
180180
181181With ` find_where ` , pass in a dict and return the first object found. In
@@ -188,11 +188,11 @@ So you may now use:
188188``` python
189189# Prepping the example:
190190>> > server.sessions[0 ].rename_session(' foo' )
191- Session($ ... foo)
191+ Session($ 1 foo)
192192
193193>> > session = server.find_where({ " session_name" : " foo" })
194194>> > session
195- Session($ ... foo)
195+ Session($ 1 foo)
196196```
197197
198198to give us a ` session ` object to play with.
@@ -206,7 +206,7 @@ Let's make a {meth}`Session.new_window`, in the background:
206206
207207``` python
208208>> > session.new_window(attach = False , window_name = " ha in the bg" )
209- Window(@ ... ... :ha in the bg, Session($ ... ... ))
209+ Window(@ 2 ... :ha in the bg, Session($ 1 ... ))
210210```
211211
212212So a few things:
@@ -245,15 +245,15 @@ should have history, so navigate up with the arrow key.
245245
246246``` python
247247>> > session.new_window(attach = False , window_name = " ha in the bg" )
248- Window(@ ... ... :ha in the bg, Session($ ... ... ))
248+ Window(@ 2 ... :ha in the bg, Session($ 1 ... ))
249249```
250250
251251Try to kill the window by the matching id ` @[0-9999] ` .
252252
253253``` python
254254# Setup
255255>> > session.new_window(attach = False , window_name = " ha in the bg" )
256- Window(@ ... ... :ha in the bg, Session($ ... ... ))
256+ Window(@ 1 ... :ha in the bg, Session($ 1 ... ))
257257
258258>> > session.kill_window(' ha in the bg' )
259259```
@@ -264,7 +264,7 @@ object:
264264``` python
265265>> > window = session.new_window(attach = False , window_name = " check this out" )
266266>> > window
267- Window(@ ... ... :check this out, Session($ ... ... ))
267+ Window(@ 2 2 :check this out, Session($ 1 ... ))
268268```
269269
270270And kill:
@@ -291,7 +291,7 @@ Let's create a pane, {meth}`Window.split_window`:
291291
292292``` python
293293>> > window.split_window(attach = False )
294- Pane(% ... Window(@ ... ... :... , Session($ ... ... )))
294+ Pane(% 2 Window(@ 1 ... :... , Session($ 1 ... )))
295295```
296296
297297Powered up. Let's have a break down:
@@ -304,7 +304,7 @@ Also, since you are aware of this power, let's commemorate the experience:
304304
305305``` python
306306>> > window.rename_window(' libtmuxower' )
307- Window(@ ... ... :... , Session($ ... ... ))
307+ Window(@ 1 ... :... , Session($ 1 ... ))
308308```
309309
310310You should have noticed {meth}` Window.rename_window ` renamed the window.
@@ -329,7 +329,7 @@ can also use the `.select_*` available on the object, in this case the pane has
329329
330330``` python
331331>> > pane.select_pane()
332- Pane(% ... Window(@ ... ... :... , Session($ ... ... )))
332+ Pane(% 1 Window(@ 1 ... :... , Session($ 1 ... )))
333333```
334334
335335``` {eval-rst}
0 commit comments