Skip to content

Commit 844961a

Browse files
author
PI-Victor
committed
fixed a few typos to doc/quickstart_python.rst
1 parent c1e5ac2 commit 844961a

File tree

1 file changed

+21
-26
lines changed

1 file changed

+21
-26
lines changed

doc/quickstart_python.rst

Lines changed: 21 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ has some awesome CLI features, or setup vanilla :py:mod:`readline` support.
2323
"""""""""""""""""""""""""""
2424

2525
.. seealso::
26-
Source: `How do I add tab-completion to the python shell`_ on
26+
Source: `How do I add tab-completion to the python shell`_ on
2727
`StackOverflow`_.
2828

2929
Create ``~.pythonrc`` in ``$HOME`` folder:
@@ -40,7 +40,7 @@ Create ``~.pythonrc`` in ``$HOME`` folder:
4040
import rlcompleter
4141
readline.parse_and_bind("tab: complete")
4242
43-
Then to your ``.bashrc`` or ``.zshrc`` file, add:
43+
Then in your ``.bashrc`` or ``.zshrc`` file, add:
4444

4545
.. code-block:: bash
4646
@@ -130,7 +130,7 @@ Find your :class:`Session`
130130
and allow a quick option to grab the current tmux's environment's
131131
:class:`Server`, :class:`Window` and :class:`Pane` via CLI.
132132

133-
If you have multiple tmux session's open. You can see that all of the
133+
If you have multiple tmux sessions open, you can see that all of the
134134
methods in :class:`Server` are available.
135135

136136
We can list sessions with :meth:`Server.list_sessions`:
@@ -140,16 +140,16 @@ We can list sessions with :meth:`Server.list_sessions`:
140140
>>> server.list_sessions()
141141
[Session($3 a_tmuxp_session), Session($1 tmuxp)]
142142
143-
This returns a list of :class:`Session` objects you can grab. You could
144-
our current session with:
143+
This returns a list of :class:`Session` objects you can grab. We can
144+
find our current session with:
145145

146146
.. code-block:: python
147147
148148
>>> server.list_sessions()[0]
149149
150-
That's not guaranteed. tmuxp works against current tmux information, the
151-
session's name could be changed, or another tmux session may be created,
152-
so :meth:`Server.getById` and :meth:`Server.findWhere` exists as a lookup:
150+
However, this isn't guaranteed, tmuxp works against current tmux information, the
151+
session's name could be changed, or another tmux session may be created,
152+
so :meth:`Server.getById` and :meth:`Server.findWhere` exists as a lookup.
153153

154154
Get session by ID
155155
-----------------
@@ -197,8 +197,8 @@ Playing with our tmux session
197197
.. todo::
198198

199199
Consider migrating tmuxp to use a ``.execute`` sqlalchemy style and have
200-
commands such as ``new_window()`` return CLI output. Also tmuxp could use
201-
use "engine" as a way to control if it's using socket's or shell commands
200+
commands such as ``new_window()`` return CLI output. Also tmuxp could
201+
use "engine" as a way to control if it's using a socket or shell commands
202202
to handle tmux.
203203

204204
We now have access to ``session`` from above with all of the methods
@@ -231,23 +231,20 @@ Method 1: Use passthrough to tmux's ``target`` system.
231231
232232
>>> session.kill_window("ha in")
233233
234-
The window in the bg dissapeared. This was the equivalent of ``$ tmux kill-window -t'ha in'``
234+
The window in the bg dissappeared. This was the equivalent of ``$ tmux kill-window -t'ha in'``
235235

236-
Internally, tmux uses ``target``. It's specific behavior depends on what the target is, view
237-
the manpage for tmux for more.
236+
Internally, tmux uses ``target``. Its specific behavior depends on what the target is, view the tmux manpage for more information.
238237

239-
This section contains a list of the commands supported by tmux. Most commands accept the
240-
optional -t argument with one of target-client, target-session target-window, or target-pane.
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.
241239

242-
In this case, you can also go back in time an recreate the window again. The CLI should have history,
243-
so press the up arrow key should work.
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.
244241

245242
.. code-block:: python
246243
247244
>>> session.new_window(attach=False, window_name="ha in the bg")
248245
Window(@11 3:ha in the bg, Session($3 a_tmuxp_session))
249246
250-
Try to kill by the ``@[0-9999]`` the created window gave you.
247+
Try to kill the window by the matching id ``@[0-9999]``.
251248

252249
.. code-block:: python
253250
@@ -312,7 +309,7 @@ You should have noticed :meth:`Window.rename_window` renamed the window.
312309
Moving cursor across windows and panes
313310
--------------------------------------
314311

315-
You have to ways you can move your cursor to new sessions, windows and panes.
312+
You have two ways you can move your cursor to new sessions, windows and panes.
316313

317314
For one, arguments such as ``attach=False`` can be omittted.
318315

@@ -321,7 +318,7 @@ For one, arguments such as ``attach=False`` can be omittted.
321318
>>> pane = window.split_window()
322319
323320
This gives you the :class:`Pane` along with moving the cursor to a new window. You
324-
can also use the ``.select_*`` available on the object. In this case, pane has
321+
can also use the ``.select_*`` available on the object, in this case the pane has
325322
:meth:`Pane.select_pane()`.
326323

327324
.. code-block:: python
@@ -338,7 +335,7 @@ Sending commands to tmux panes remotely
338335
---------------------------------------
339336

340337
You may send commands to panes, windows and sessions **without** them being visible.
341-
As long as you have the object, or are iterating through a list of them, you can ``.send_keys``.
338+
As long as you have the object, or are iterating through a list of them, you can use ``.send_keys``.
342339

343340
.. code-block:: python
344341
@@ -347,12 +344,10 @@ As long as you have the object, or are iterating through a list of them, you can
347344
>>> pane.send_keys('echo hey', enter=False)
348345
349346
See the other window, notice that :meth:`Pane.send_keys` has " ``echo hey``" written,
350-
*still in the prompt*. Note the leading space character so the command won't be added
351-
to the user's history. Use `pane.cmd('send-keys', text)` to send keys without this
352-
leading space.
347+
*still in the prompt*. Note the leading space character so the command won't be added to the user's history. Use `pane.cmd('send-keys', text)` to send keys without this leading space.
353348

354349
``enter=False`` can be used to send keys without pressing return. In this case,
355-
you may leave it to the user to press return themselves, or complete a command
350+
you may leave it to the user to press return himself, or complete a command
356351
using :meth:`Pane.enter()`:
357352

358353
.. code-block:: python
@@ -363,7 +358,7 @@ Final notes
363358
-----------
364359

365360
These objects created use tmux's internal usage of ID's to make servers,
366-
sessions, windows and panes accessible at the object level.
361+
sessions, windows and panes accessible at the object level.
367362

368363
You don't have to see the tmux session to be able to orchestrate it. After
369364
all, :class:`WorkspaceBuilder` uses these same internals to build your

0 commit comments

Comments
 (0)