Skip to content

Commit 648171d

Browse files
committed
Add documentation and example configurations for options_after
Example shows how to ssh into two different servers with synchronized panes.
1 parent dae71f1 commit 648171d

File tree

3 files changed

+42
-0
lines changed

3 files changed

+42
-0
lines changed

doc/examples.rst

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,25 @@ JSON
301301
.. literalinclude:: ../examples/options.json
302302
:language: json
303303

304+
Set window options after pane creation
305+
--------------------------------------
306+
307+
Apply window options after panes have been created. Useful for
308+
``synchronize-panes`` option after executing individual commands in each
309+
pane during creation.
310+
311+
YAML
312+
~~~~
313+
314+
.. literalinclude:: ../examples/2-pane-synchronized.yaml
315+
:language: yaml
316+
317+
JSON
318+
~~~~
319+
320+
.. literalinclude:: ../examples/2-pane-synchronized.json
321+
:language: json
322+
304323
Main pane height
305324
----------------
306325

examples/2-pane-synchronized.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"session_name": "2-pane-synchronized",
3+
"windows": [
4+
{
5+
"window_name": "Two synchronized panes",
6+
"panes": [
7+
"ssh server1",
8+
"ssh server2"
9+
],
10+
"options_after": {
11+
"synchronize-panes": true
12+
}
13+
}
14+
]
15+
}

examples/2-pane-synchronized.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
session_name: 2-pane-synchronized
2+
windows:
3+
- window_name: Two synchronized panes
4+
panes:
5+
- ssh server1
6+
- ssh server2
7+
options_after:
8+
synchronize-panes: on

0 commit comments

Comments
 (0)