-
Notifications
You must be signed in to change notification settings - Fork 3
/
artistoolscompletions.sh
324 lines (304 loc) · 11.3 KB
/
artistoolscompletions.sh
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
#!/usr/bin/env zsh
#compdef __MY_COMMAND__
# Run something, muting output or redirecting it to the debug stream
# depending on the value of _ARC_DEBUG.
# If ARGCOMPLETE_USE_TEMPFILES is set, use tempfiles for IPC.
__python_argcomplete_run() {
if [[ -z "${ARGCOMPLETE_USE_TEMPFILES-}" ]]; then
__python_argcomplete_run_inner "$@"
return
fi
local tmpfile="$(mktemp)"
_ARGCOMPLETE_STDOUT_FILENAME="$tmpfile" __python_argcomplete_run_inner "$@"
local code=$?
cat "$tmpfile"
rm "$tmpfile"
return $code
}
__python_argcomplete_run_inner() {
if [[ -z "${_ARC_DEBUG-}" ]]; then
"$@" 8>&1 9>&2 1>/dev/null 2>&1
else
"$@" 8>&1 9>&2 1>&9 2>&1
fi
}
_python_argcomplete() {
local IFS=$'\013'
local script=""
if [[ -n "${ZSH_VERSION-}" ]]; then
local completions
completions=($(IFS="$IFS" \
COMP_LINE="$BUFFER" \
COMP_POINT="$CURSOR" \
_ARGCOMPLETE=1 \
_ARGCOMPLETE_SHELL="zsh" \
_ARGCOMPLETE_SUPPRESS_SPACE=1 \
__python_argcomplete_run ${script:-${words[1]}}))
local nosort=()
local nospace=()
if is-at-least 5.8; then
nosort=(-o nosort)
fi
if [[ "${completions-}" =~ ([^\\]): && "${match[1]}" =~ [=/:] ]]; then
nospace=(-S '')
fi
_describe "${words[1]}" completions "${nosort[@]}" "${nospace[@]}"
else
local SUPPRESS_SPACE=0
if compopt +o nospace 2> /dev/null; then
SUPPRESS_SPACE=1
fi
COMPREPLY=($(IFS="$IFS" \
COMP_LINE="$COMP_LINE" \
COMP_POINT="$COMP_POINT" \
COMP_TYPE="$COMP_TYPE" \
_ARGCOMPLETE_COMP_WORDBREAKS="$COMP_WORDBREAKS" \
_ARGCOMPLETE=1 \
_ARGCOMPLETE_SHELL="bash" \
_ARGCOMPLETE_SUPPRESS_SPACE=$SUPPRESS_SPACE \
__python_argcomplete_run ${script:-$1}))
if [[ $? != 0 ]]; then
unset COMPREPLY
elif [[ $SUPPRESS_SPACE == 1 ]] && [[ "${COMPREPLY-}" =~ [=/:]$ ]]; then
compopt -o nospace
fi
fi
}
if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o nospace -o default -o bashdefault -F _python_argcomplete at
else
# When called by the Zsh completion system, this will end with
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
# the script was "eval"-ed so use "compdef" to register it with the
# completion system
autoload is-at-least
if [[ $zsh_eval_context == *func ]]; then
_python_argcomplete "$@"
else
compdef _python_argcomplete at
fi
fi
if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o nospace -o default -o bashdefault -F _python_argcomplete artistools
else
# When called by the Zsh completion system, this will end with
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
# the script was "eval"-ed so use "compdef" to register it with the
# completion system
autoload is-at-least
if [[ $zsh_eval_context == *func ]]; then
_python_argcomplete "$@"
else
compdef _python_argcomplete artistools
fi
fi
if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o nospace -o default -o bashdefault -F _python_argcomplete makeartismodel1dslicefromcone
else
# When called by the Zsh completion system, this will end with
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
# the script was "eval"-ed so use "compdef" to register it with the
# completion system
autoload is-at-least
if [[ $zsh_eval_context == *func ]]; then
_python_argcomplete "$@"
else
compdef _python_argcomplete makeartismodel1dslicefromcone
fi
fi
if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o nospace -o default -o bashdefault -F _python_argcomplete makeartismodel
else
# When called by the Zsh completion system, this will end with
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
# the script was "eval"-ed so use "compdef" to register it with the
# completion system
autoload is-at-least
if [[ $zsh_eval_context == *func ]]; then
_python_argcomplete "$@"
else
compdef _python_argcomplete makeartismodel
fi
fi
if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o nospace -o default -o bashdefault -F _python_argcomplete plotartisdensity
else
# When called by the Zsh completion system, this will end with
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
# the script was "eval"-ed so use "compdef" to register it with the
# completion system
autoload is-at-least
if [[ $zsh_eval_context == *func ]]; then
_python_argcomplete "$@"
else
compdef _python_argcomplete plotartisdensity
fi
fi
if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o nospace -o default -o bashdefault -F _python_argcomplete plotartisdeposition
else
# When called by the Zsh completion system, this will end with
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
# the script was "eval"-ed so use "compdef" to register it with the
# completion system
autoload is-at-least
if [[ $zsh_eval_context == *func ]]; then
_python_argcomplete "$@"
else
compdef _python_argcomplete plotartisdeposition
fi
fi
if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o nospace -o default -o bashdefault -F _python_argcomplete plotartisestimators
else
# When called by the Zsh completion system, this will end with
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
# the script was "eval"-ed so use "compdef" to register it with the
# completion system
autoload is-at-least
if [[ $zsh_eval_context == *func ]]; then
_python_argcomplete "$@"
else
compdef _python_argcomplete plotartisestimators
fi
fi
if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o nospace -o default -o bashdefault -F _python_argcomplete plotartislightcurve
else
# When called by the Zsh completion system, this will end with
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
# the script was "eval"-ed so use "compdef" to register it with the
# completion system
autoload is-at-least
if [[ $zsh_eval_context == *func ]]; then
_python_argcomplete "$@"
else
compdef _python_argcomplete plotartislightcurve
fi
fi
if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o nospace -o default -o bashdefault -F _python_argcomplete plotartislinefluxes
else
# When called by the Zsh completion system, this will end with
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
# the script was "eval"-ed so use "compdef" to register it with the
# completion system
autoload is-at-least
if [[ $zsh_eval_context == *func ]]; then
_python_argcomplete "$@"
else
compdef _python_argcomplete plotartislinefluxes
fi
fi
if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o nospace -o default -o bashdefault -F _python_argcomplete plotartismacroatom
else
# When called by the Zsh completion system, this will end with
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
# the script was "eval"-ed so use "compdef" to register it with the
# completion system
autoload is-at-least
if [[ $zsh_eval_context == *func ]]; then
_python_argcomplete "$@"
else
compdef _python_argcomplete plotartismacroatom
fi
fi
if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o nospace -o default -o bashdefault -F _python_argcomplete plotartisnltepops
else
# When called by the Zsh completion system, this will end with
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
# the script was "eval"-ed so use "compdef" to register it with the
# completion system
autoload is-at-least
if [[ $zsh_eval_context == *func ]]; then
_python_argcomplete "$@"
else
compdef _python_argcomplete plotartisnltepops
fi
fi
if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o nospace -o default -o bashdefault -F _python_argcomplete plotartisnonthermal
else
# When called by the Zsh completion system, this will end with
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
# the script was "eval"-ed so use "compdef" to register it with the
# completion system
autoload is-at-least
if [[ $zsh_eval_context == *func ]]; then
_python_argcomplete "$@"
else
compdef _python_argcomplete plotartisnonthermal
fi
fi
if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o nospace -o default -o bashdefault -F _python_argcomplete plotartisradfield
else
# When called by the Zsh completion system, this will end with
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
# the script was "eval"-ed so use "compdef" to register it with the
# completion system
autoload is-at-least
if [[ $zsh_eval_context == *func ]]; then
_python_argcomplete "$@"
else
compdef _python_argcomplete plotartisradfield
fi
fi
if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o nospace -o default -o bashdefault -F _python_argcomplete plotartisspectrum
else
# When called by the Zsh completion system, this will end with
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
# the script was "eval"-ed so use "compdef" to register it with the
# completion system
autoload is-at-least
if [[ $zsh_eval_context == *func ]]; then
_python_argcomplete "$@"
else
compdef _python_argcomplete plotartisspectrum
fi
fi
if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o nospace -o default -o bashdefault -F _python_argcomplete plotartistransitions
else
# When called by the Zsh completion system, this will end with
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
# the script was "eval"-ed so use "compdef" to register it with the
# completion system
autoload is-at-least
if [[ $zsh_eval_context == *func ]]; then
_python_argcomplete "$@"
else
compdef _python_argcomplete plotartistransitions
fi
fi
if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o nospace -o default -o bashdefault -F _python_argcomplete plotartisinitialcomposition
else
# When called by the Zsh completion system, this will end with
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
# the script was "eval"-ed so use "compdef" to register it with the
# completion system
autoload is-at-least
if [[ $zsh_eval_context == *func ]]; then
_python_argcomplete "$@"
else
compdef _python_argcomplete plotartisinitialcomposition
fi
fi
if [[ -z "${ZSH_VERSION-}" ]]; then
complete -o nospace -o default -o bashdefault -F _python_argcomplete plotartisviewingangles
else
# When called by the Zsh completion system, this will end with
# "loadautofunc" when initially autoloaded and "shfunc" later on, otherwise,
# the script was "eval"-ed so use "compdef" to register it with the
# completion system
autoload is-at-least
if [[ $zsh_eval_context == *func ]]; then
_python_argcomplete "$@"
else
compdef _python_argcomplete plotartisviewingangles
fi
fi