Skip to content

Commit d278a46

Browse files
authored
refactor!(Pane.send_keys): Default suppress_history value to False (#395)
2 parents 373baf0 + 605e803 commit d278a46

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

CHANGES

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ $ pip install --user --upgrade --pre libtmux
1212

1313
- _Insert changes/features/fixes for next release here_
1414

15+
### Breaking changes
16+
17+
- `Pane.send_keys`: `suppress_history` default value changed from `True` to
18+
`False`
19+
1520
### Tests and docs
1621

1722
- Initial [doctests] examples stubbed out {issue}`#394`

libtmux/pane.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ def send_keys(
130130
self,
131131
cmd: str,
132132
enter: t.Optional[bool] = True,
133-
suppress_history: t.Optional[bool] = True,
133+
suppress_history: t.Optional[bool] = False,
134134
literal: t.Optional[bool] = False,
135135
) -> None:
136136
r"""``$ tmux send-keys`` to the pane.
@@ -145,7 +145,11 @@ def send_keys(
145145
enter : bool, optional
146146
Send enter after sending the input, default True.
147147
suppress_history : bool, optional
148-
Don't add these keys to the shell history, default True.
148+
Prepend a space to command to suppress shell history, default False.
149+
150+
.. versionchanged:: 0.14
151+
152+
Default changed from True to False.
149153
literal : bool, optional
150154
Send keys literally, default True.
151155
@@ -155,7 +159,7 @@ def send_keys(
155159
>>> pane.capture_pane()
156160
['$']
157161
158-
>>> pane.send_keys('echo "Hello world"', suppress_history=False, enter=True)
162+
>>> pane.send_keys('echo "Hello world"', enter=True)
159163
160164
>>> pane.capture_pane()
161165
['$ echo "Hello world"', 'Hello world', '$']

0 commit comments

Comments
 (0)