Skip to content

Commit 593a182

Browse files
committed
Update README.rst
1 parent dc444e2 commit 593a182

File tree

1 file changed

+20
-7
lines changed

1 file changed

+20
-7
lines changed

README.rst

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,37 +44,50 @@ pilot your tmux session via python
4444
>>> server
4545
<libtmux.server.Server object at 0x7fbd622c1dd0>
4646
47-
list sessions::
47+
list sessions:
48+
49+
.. code-block:: python
4850
4951
>>> server.list_sessions()
5052
[Session($3 foo), Session($1 libtmux)]
5153
52-
find session::
54+
find session:
55+
56+
.. code-block:: python
5357
5458
>>> server.get_by_id('$3')
5559
Session($3 foo)
5660
57-
find session by dict lookup::
61+
find session by dict lookup:
62+
63+
.. code-block:: python
5864
5965
>>> server.find_where({ "session_name": "foo" })
6066
Session($3 foo)
6167
62-
assign session to ``session``::
68+
assign session to ``session``:
69+
70+
.. code-block:: python
6371
6472
>>> session = server.find_where({ "session_name": "foo" })
6573
66-
play with session::
74+
play with session:
75+
76+
.. code-block:: python
6777
6878
>>> session.new_window(attach=False, window_name="ha in the bg")
6979
Window(@8 2:ha in the bg, Session($3 foo))
7080
>>> session.kill_window("ha in")
7181
72-
create new window in the background (don't switch to it)::
82+
create new window in the background (don't switch to it):
83+
84+
.. code-block:: python
7385
7486
>>> w = session.new_window(attach=False, window_name="ha in the bg")
7587
Window(@11 3:ha in the bg, Session($3 foo))
7688
77-
kill window object directly::
89+
kill window object directly:
90+
7891

7992
>>> w.kill_window()
8093

0 commit comments

Comments
 (0)