You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider migrating libtmux to use a ``.execute`` sqlalchemy style and have
200
-
commands such as ``new_window()`` return CLI output. Also libtmux could
201
-
use "engine" as a way to control if it's using a socket or shell commands
202
-
to handle tmux.
203
-
204
139
We now have access to ``session`` from above with all of the methods
205
140
available in :class:`Session`.
206
141
@@ -209,7 +144,7 @@ Let's make a :meth:`Session.new_window`, in the background:
209
144
.. code-block:: python
210
145
211
146
>>> session.new_window(attach=False, window_name="ha in the bg")
212
-
Window(@82:ha in the bg, Session($3a_libtmux_session))
147
+
Window(@82:ha in the bg, Session($3foo))
213
148
214
149
So a few things:
215
150
@@ -220,8 +155,7 @@ So a few things:
220
155
221
156
.. note::
222
157
223
-
In any of the cases, you can look up the detailed :ref:`api` to see all
224
-
the options you have.
158
+
Use the API reference :ref:`api` for more commands.
225
159
226
160
Let's delete that window (:meth:`Session.kill_window`).
227
161
@@ -231,30 +165,30 @@ Method 1: Use passthrough to tmux's ``target`` system.
231
165
232
166
>>> session.kill_window("ha in")
233
167
234
-
The window in the bg dissappeared. This was the equivalent of ``$ tmux kill-window -t'ha in'``
168
+
The window in the bg dissappeared. This was the equivalent of
169
+
``$ tmux kill-window -t'ha in'``
235
170
236
-
Internally, tmux uses ``target``. Its specific behavior depends on what the target is, view the tmux manpage for more information.
171
+
Internally, tmux uses ``target``. Its specific behavior depends on what the
172
+
target is, view the tmux manpage for more information::
237
173
238
-
This section contains a list of the commands supported by tmux. Most commands accept the optional -t argument with one of target-client, target-session target-window, or target-pane.
174
+
This section contains a list of the commands supported by tmux. Most commands
175
+
accept the optional -t argument with one of target-client, target-session,
176
+
target-window, or target-pane.
239
177
240
-
In this case, you can also go back in time and recreate the window again. The CLI should have history, so navigate up with the arrow key.
178
+
In this case, you can also go back in time and recreate the window again. The CLI
179
+
should have history, so navigate up with the arrow key.
241
180
242
181
.. code-block:: python
243
182
244
183
>>> session.new_window(attach=False, window_name="ha in the bg")
245
-
Window(@113:ha in the bg, Session($3a_libtmux_session))
184
+
Window(@113:ha in the bg, Session($3foo))
246
185
247
186
Try to kill the window by the matching id ``@[0-9999]``.
248
187
249
188
.. code-block:: python
250
189
251
190
>>> session.new_window(attach=False, window_name="ha in the bg")
252
-
Window(@123:ha in the bg, Session($3 a_libtmux_session))
253
-
254
-
255
-
.. code-block:: python
256
-
257
-
>>> session.kill_window('@12')
191
+
Window(@123:ha in the bg, Session($3 foo))
258
192
259
193
In addition, you could also ``.kill_window`` direction from the :class:`Window`
260
194
object:
@@ -269,8 +203,8 @@ And kill:
269
203
270
204
>>> window.kill_window()
271
205
272
-
And of course, you can use :meth:`Session.list_windows()` and :meth:`Session.findWhere()`
273
-
to list and sort through active :class:`Window`'s.
206
+
Use :meth:`Session.list_windows()` and :meth:`Session.findWhere()` to list and sort
207
+
through active :class:`Window`'s.
274
208
275
209
Manipulating windows
276
210
--------------------
@@ -289,7 +223,7 @@ Let's create a pane, :meth:`Window.split_window`:
0 commit comments