Skip to content

Commit 1766804

Browse files
committed
docs(examples): Add examples to page
1 parent 6f1aa2d commit 1766804

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

docs/examples.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,50 @@ Omit sending {kbd}`enter` to key commands. Equivalent to
375375
376376
````
377377

378+
## Pausing commands
379+
380+
```{versionadded} 1.10.0b4
381+
`sleep_before` and `sleep_after` options added. Pane and command-level support.
382+
```
383+
384+
Omit sending {kbd}`enter` to key commands. Equivalent to having
385+
a [`time.sleep`](time.sleep) before and after [`send_keys`](libtmux.Pane.send_keys).
386+
387+
````{tab} YAML
388+
389+
```{literalinclude} ../examples/sleep.yaml
390+
:language: yaml
391+
392+
```
393+
394+
````
395+
396+
````{tab} JSON
397+
398+
```{literalinclude} ../examples/sleep.json
399+
:language: json
400+
401+
```
402+
403+
````
404+
405+
````{tab} YAML (pane-level)
406+
407+
```{literalinclude} ../examples/sleep-pane-level.yaml
408+
:language: yaml
409+
410+
```
411+
412+
````
413+
414+
````{tab} JSON (pane-level)
415+
416+
```{literalinclude} ../examples/sleep-pane-level.json
417+
:language: json
418+
419+
```
420+
421+
````
378422

379423
## Window Index
380424

0 commit comments

Comments
 (0)