Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ $ pip install --user --upgrade --pre libtmux

- _Insert changes/features/fixes for next release here_

### Breaking changes

- `Pane.send_keys`: `suppress_history` default value changed from `True` to
`False`

### Tests and docs

- Initial [doctests] examples stubbed out {issue}`#394`
Expand Down
10 changes: 7 additions & 3 deletions libtmux/pane.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def send_keys(
self,
cmd: str,
enter: t.Optional[bool] = True,
suppress_history: t.Optional[bool] = True,
suppress_history: t.Optional[bool] = False,
literal: t.Optional[bool] = False,
) -> None:
r"""``$ tmux send-keys`` to the pane.
Expand All @@ -145,7 +145,11 @@ def send_keys(
enter : bool, optional
Send enter after sending the input, default True.
suppress_history : bool, optional
Don't add these keys to the shell history, default True.
Prepend a space to command to suppress shell history, default False.

.. versionchanged:: 0.14

Default changed from True to False.
literal : bool, optional
Send keys literally, default True.

Expand All @@ -155,7 +159,7 @@ def send_keys(
>>> pane.capture_pane()
['$']

>>> pane.send_keys('echo "Hello world"', suppress_history=False, enter=True)
>>> pane.send_keys('echo "Hello world"', enter=True)

>>> pane.capture_pane()
['$ echo "Hello world"', 'Hello world', '$']
Expand Down