File tree 3 files changed +45
-0
lines changed
3 files changed +45
-0
lines changed Original file line number Diff line number Diff line change @@ -355,6 +355,33 @@ Omit sending {kbd}`enter` to key commands. Equivalent to
355
355
356
356
````
357
357
358
+ ## Pause / delay command execution
359
+
360
+ ``` {versionadded} 1.10.0bX
361
+ `sleep: [seconds]` option
362
+ ```
363
+
364
+ Omit sending {kbd}` enter ` to key commands. Equivalent to
365
+ [ ` time.sleep() ` ] ( time.sleep ) before [ ` send_keys(enter=False) ` ] ( libtmux.Pane.send_keys ) .
366
+
367
+ ```` {tab} YAML
368
+
369
+ ```{literalinclude} ../examples/sleep.yaml
370
+ :language: yaml
371
+
372
+ ```
373
+
374
+ ````
375
+
376
+ ```` {tab} JSON
377
+
378
+ ```{literalinclude} ../examples/sleep.json
379
+ :language: json
380
+
381
+ ```
382
+
383
+ ````
384
+
358
385
## Window Index
359
386
360
387
You can specify a window's index using the ` window_index ` property. Windows
Original file line number Diff line number Diff line change
1
+ {
2
+ "session_name" : " Should sleep 3 seconds before sending pane commands" ,
3
+ "windows" : [
4
+ {
5
+ "panes" : [
6
+ {
7
+ "shell_command" : " echo \" ___$((1 + 3))___\" " ,
8
+ "sleep" : 3
9
+ }
10
+ ]
11
+ }
12
+ ]
13
+ }
Original file line number Diff line number Diff line change
1
+ session_name : Should sleep 3 seconds before sending pane commands
2
+ windows :
3
+ - panes :
4
+ - shell_command : echo "___$((1 + 3))___"
5
+ sleep : 3
You can’t perform that action at this time.
0 commit comments