Skip to content

Commit 886c1ca

Browse files
committed
Examples and docs.
1 parent 4303bf9 commit 886c1ca

File tree

3 files changed

+44
-2
lines changed

3 files changed

+44
-2
lines changed

doc/examples.rst

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ JSON
162162
.. literalinclude:: ../examples/start-directory.json
163163
:language: json
164164

165-
Environment variables
166-
---------------------
165+
Environment variable replacing
166+
------------------------------
167167

168168
tmuxp will replace environment variables wrapped in curly brackets
169169
for the following variables:
@@ -206,6 +206,23 @@ JSON
206206
.. literalinclude:: ../examples/env-variables.json
207207
:language: json
208208

209+
Environment variables
210+
---------------------
211+
212+
tmuxp will set session environment variables.
213+
214+
YAML
215+
~~~~
216+
217+
.. literalinclude:: ../examples/session-environment.yaml
218+
:language: yaml
219+
220+
JSON
221+
~~~~
222+
223+
.. literalinclude:: ../examples/session-environment.json
224+
:language: json
225+
209226
Focusing
210227
--------
211228

examples/session-environment.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"environment": {
3+
"EDITOR": "/usr/bin/vim",
4+
"HOME": "/tmp/hm",
5+
},
6+
"windows": [
7+
{
8+
"panes": [
9+
null,
10+
],
11+
"window_name": "Blank pane test"
12+
},
13+
],
14+
"session_name": "Environment variables test"
15+
}

examples/session-environment.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
session_name: Environment variables test
2+
environment:
3+
EDITOR: /usr/bin/vim
4+
HOME: /tmp/hm
5+
windows:
6+
# Emptiness will simply open a blank pane, if no shell_command_before.
7+
# All these are equivalent
8+
- window_name: Blank pane test
9+
panes:
10+
-

0 commit comments

Comments
 (0)