Skip to content

Commit eb85821

Browse files
committed
docs: enter: false
Documents and examples for #53 #293 #735
1 parent 2c6f4c3 commit eb85821

File tree

4 files changed

+55
-0
lines changed

4 files changed

+55
-0
lines changed

CHANGES

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@
66

77
#### What's new
88

9+
- #747: Skip execution via `enter: false`
10+
11+
```yaml
12+
session_name: Should not execute
13+
windows:
14+
- panes:
15+
- shell_command: echo "___$((1 + 3))___"
16+
enter: false
17+
```
18+
919
- #701: `tmuxp freeze` now accepts `--quiet` and `--yes` along with the
1020
`--config-format` and filename (`--save-to`). This means you can do it all in
1121
one command:

docs/examples.md

+27
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,33 @@ This will add the `shell_command` to the bash history in the pane.
328328
329329
````
330330

331+
## Skip command execution
332+
333+
```{versionadded} 1.10.0b1
334+
`enter: false` option
335+
```
336+
337+
Omit sending {kbd}`enter` to key commands. Equivalent to
338+
[`send_keys(enter=False)`](libtmux.Pane.send_keys).
339+
340+
````{tab} YAML
341+
342+
```{literalinclude} ../examples/skip-send.yaml
343+
:language: yaml
344+
345+
```
346+
347+
````
348+
349+
````{tab} JSON
350+
351+
```{literalinclude} ../examples/skip-send.json
352+
:language: json
353+
354+
```
355+
356+
````
357+
331358
## Window Index
332359

333360
You can specify a window's index using the `window_index` property. Windows

examples/skip-send.json

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"session_name": "Should not execute",
3+
"windows": [
4+
{
5+
"panes": [
6+
{
7+
"shell_command": "echo \"___$((1 + 3))___\"",
8+
"enter": false
9+
}
10+
]
11+
}
12+
]
13+
}

examples/skip-send.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
session_name: Should not execute
2+
windows:
3+
- panes:
4+
- shell_command: echo "___$((1 + 3))___"
5+
enter: false

0 commit comments

Comments
 (0)