Skip to content

Commit ff0073e

Browse files
committed
README: Move shell down
1 parent fd01760 commit ff0073e

File tree

1 file changed

+44
-44
lines changed

1 file changed

+44
-44
lines changed

README.rst

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -17,50 +17,6 @@ Installation
1717
1818
$ pip install --user tmuxp
1919
20-
Shell
21-
-----
22-
*New in 1.6.0*:
23-
24-
``tmuxp shell`` launches into a python console preloaded with the attached server,
25-
session, and window in `libtmux`_ objects.
26-
27-
.. code-block:: shell
28-
29-
$ tmuxp shell
30-
31-
(Pdb) server
32-
<libtmux.server.Server object at 0x7f7dc8e69d10>
33-
(Pdb) server.sessions
34-
[Session($1 your_project)]
35-
(Pdb) session
36-
Session($1 your_project)
37-
(Pdb) session.name
38-
'your_project'
39-
(Pdb) window
40-
Window(@3 1:your_window, Session($1 your_project))
41-
(Pdb) window.name
42-
'your_window'
43-
(Pdb) window.panes
44-
[Pane(%6 Window(@3 1:your_window, Session($1 your_project)))
45-
(Pdb) pane
46-
Pane(%6 Window(@3 1:your_window, Session($1 your_project))
47-
48-
Python 3.7+ supports `PEP 553`_ ``breakpoint()`` (including
49-
``PYTHONBREAKPOINT``). Also supports direct commands via ``-c``:
50-
51-
.. code-block:: shell
52-
53-
$ tmuxp shell -c 'print(window.name)'
54-
my_window
55-
56-
$ tmuxp shell -c 'print(window.name.upper())'
57-
MY_WINDOW
58-
59-
Read more on `tmuxp shell`_ in the CLI docs.
60-
61-
.. _PEP 553: https://www.python.org/dev/peps/pep-0553/
62-
.. _tmuxp shell: http://localhost:8031/cli.html#shell
63-
6420
Load a tmux session
6521
-------------------
6622

@@ -126,6 +82,50 @@ Load your tmuxp config from anywhere by using the filename, assuming
12682
12783
See `author's tmuxp configs`_ and the projects' `tmuxp.yaml`_.
12884

85+
Shell
86+
-----
87+
*New in 1.6.0*:
88+
89+
``tmuxp shell`` launches into a python console preloaded with the attached server,
90+
session, and window in `libtmux`_ objects.
91+
92+
.. code-block:: shell
93+
94+
$ tmuxp shell
95+
96+
(Pdb) server
97+
<libtmux.server.Server object at 0x7f7dc8e69d10>
98+
(Pdb) server.sessions
99+
[Session($1 your_project)]
100+
(Pdb) session
101+
Session($1 your_project)
102+
(Pdb) session.name
103+
'your_project'
104+
(Pdb) window
105+
Window(@3 1:your_window, Session($1 your_project))
106+
(Pdb) window.name
107+
'your_window'
108+
(Pdb) window.panes
109+
[Pane(%6 Window(@3 1:your_window, Session($1 your_project)))
110+
(Pdb) pane
111+
Pane(%6 Window(@3 1:your_window, Session($1 your_project))
112+
113+
Python 3.7+ supports `PEP 553`_ ``breakpoint()`` (including
114+
``PYTHONBREAKPOINT``). Also supports direct commands via ``-c``:
115+
116+
.. code-block:: shell
117+
118+
$ tmuxp shell -c 'print(window.name)'
119+
my_window
120+
121+
$ tmuxp shell -c 'print(window.name.upper())'
122+
MY_WINDOW
123+
124+
Read more on `tmuxp shell`_ in the CLI docs.
125+
126+
.. _PEP 553: https://www.python.org/dev/peps/pep-0553/
127+
.. _tmuxp shell: http://localhost:8031/cli.html#shell
128+
129129
Pre-load hook
130130
-------------
131131
Run custom startup scripts (such as installing project dependencies before

0 commit comments

Comments
 (0)