-
Notifications
You must be signed in to change notification settings - Fork 232
/
Copy pathif-conditions-test.yaml
53 lines (53 loc) · 1.2 KB
/
if-conditions-test.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
session_name: if conditions test conditions
environment:
foo: 'false'
bar: '1'
F: '0'
MY_VAR: myfoobar
windows:
- window_name: window all false
panes:
- if: ${foo}
shell_command:
- echo pane 1
- if:
shell: '[ 1 -gt 2 ]'
shell_command:
- echo pane 2
- if:
shell_var: ${F}
- window_name: window 2 of 3 true
panes:
- if:
shell: '[ "foo" = "bar" ]'
shell_command:
- echo pane 3
- if:
shell: '[ "hello" != "byte" ]'
shell_command:
- echo pane 4
- if:
python: '2**4 == 16'
shell_command:
- echo pane 5
- window_name: window 2 of 4 true
panes:
- if:
shell_var: 'FALSE'
shell_command:
- echo pane 6
- if:
shell_var: ${bar}
shell_command:
- echo pane 7
- if:
python: import os; not os.path.isdir('/a/very/random/path')
shell_command:
- echo pane 8
- if: ${non_existing_var}
shell_command:
- echo pane 9
- if:
shell: echo ${MY_VAR} | grep -q foo
shell_command:
- echo pane 10