-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathalfred.yml
136 lines (116 loc) · 2.39 KB
/
alfred.yml
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
hidden.task:
command: |
echo "Testing a hidden task"
summary:
summary: TESTING SUMMARY
command:
summary: TESTING COMMAND
command: |
echo "HELLO ALFRED"
echo "HELLO NEWLINE"
commands:
summary: TESTING COMMANDS
commands: |
echo "HELLO ALFRED" && false
echo "THIS LINE NOT SHOWN"
exit: 42
exit:
summary: TESTING EXIT
commands: |
false
exit: 100
arguments:
summary: TESTING ARGUMENTS
command: |
echo "ARG::{{ index .Args 0 }}"
default.arguments:
summary: TESTING DEFAULT ARGUMENTS
command: |
echo "ARG::{{ index .Args 0 }}"
defaults:
- "ARG1"
required.arguments:
summary: TESTING REQUIRED ARGS
command: |
echo "ARG::{{ index .Args 0 }} ARG::{{ index .Args 1 }}"
defaults:
- ""
- "ARG2"
ok:
summary: TESTING OK COMPONENT
command: |
echo "TEST::OK"
ok: |
default.arguments
default.arguments(OKTEST)
fail:
summary: TESTING FAIL COMPONENT
command: |
echo "TEST::FAIL" && false
fail: |
default.arguments
default.arguments(FAILTEST)
tasks:
summary: TESTING TASK COMPONENT
tasks: |
default.arguments
default.arguments(TASKTEST)
multitask:
summary: TESTING TASK COMPONENT
multitask: |
default.arguments
default.arguments(MULTITASKTEST)
check:
summary: TESTING CHECK COMPONENT
check: ls -alh {{ index .Args 0 }}
command: |
echo "TEST::CHECK"
config:
summary: TESTING CONFIG COMPONENT
config: "{{ index .Args 0 }}"
command: |
echo "FOO::{{ .Vars.foo }}"
echo "FIZZ::{{ .Vars.fizz }}"
dir:
summary: TESTING DIRECTORY COMPONENT
dir: "{{ index .Args 0 }}"
command: |
echo PWD::`pwd`
wait:
summary: TESTING WAIT COMPONENT
command: |
echo WAIT::TIME.DURATION
ok: summary
wait: 2s
template:
summary: TESTING TEMPLATES
command: |
echo {{ "hello!" | upper | repeat 5 }}
for:
summary: TESTING FOR LOOPS
for:
args: "{{range $i, $e := until 5}}{{$i}}\n{{end}}"
tasks: arguments
include:
summary: TESTING INCLUDE
include: catalog/
ok: taska
prompt:
summary: TESTING PROMPT
prompt:
input: Hello. How are you today?
command: |
echo RESPONSE::{{ .Vars.input }}
env:
summary: TESTING ENV
env:
setvar: TESTENV
ok: arguments($setvar)
register:
summary: TESTING REGISTER
register:
setvar: var
whoami: whoami
command: |
echo "REGISTER::{{ .Vars.setvar }}"
echo "WHOAMI::{{ .Vars.whoami }}"