postman-cli-completion 1.39.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +145 -0
- package/bin/postman-completion.mjs +83 -0
- package/completions/bash/postman.bash +1078 -0
- package/completions/fish/postman.fish +574 -0
- package/completions/zsh/_postman +1294 -0
- package/package.json +47 -0
|
@@ -0,0 +1,1078 @@
|
|
|
1
|
+
# Bash completion for Postman CLI (postman v1.39.2)
|
|
2
|
+
# Auto-generated by scripts/generate.mjs — DO NOT EDIT
|
|
3
|
+
# Source: spec/commands.json
|
|
4
|
+
# https://github.com/yokawasa/postman-cli-completion
|
|
5
|
+
#
|
|
6
|
+
# Install:
|
|
7
|
+
# source /path/to/postman.bash
|
|
8
|
+
# Or copy into /usr/local/etc/bash_completion.d/ (Homebrew) or
|
|
9
|
+
# /etc/bash_completion.d/ (Linux).
|
|
10
|
+
|
|
11
|
+
# shellcheck shell=bash disable=SC2207
|
|
12
|
+
|
|
13
|
+
_postman_filematch() {
|
|
14
|
+
local cur="$2"
|
|
15
|
+
COMPREPLY=( $(compgen -f -X "$1" -- "$cur") )
|
|
16
|
+
COMPREPLY+=( $(compgen -d -- "$cur") )
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
_postman() {
|
|
20
|
+
local cur prev
|
|
21
|
+
COMPREPLY=()
|
|
22
|
+
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
23
|
+
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
24
|
+
|
|
25
|
+
local top_commands="login logout collection api runner spec monitor workspace performance flows fl request sdk mock application app simulate context search webhook"
|
|
26
|
+
local global_flags="-v --version --silent --color -h --help -h --help"
|
|
27
|
+
|
|
28
|
+
local i cmd="" subcmd=""
|
|
29
|
+
for ((i=1; i<COMP_CWORD; i++)); do
|
|
30
|
+
case "${COMP_WORDS[i]}" in -*) continue ;; esac
|
|
31
|
+
if [[ -z "$cmd" ]]; then
|
|
32
|
+
cmd="${COMP_WORDS[i]}"
|
|
33
|
+
elif [[ -z "$subcmd" ]]; then
|
|
34
|
+
subcmd="${COMP_WORDS[i]}"
|
|
35
|
+
break
|
|
36
|
+
fi
|
|
37
|
+
done
|
|
38
|
+
|
|
39
|
+
if [[ -z "$cmd" ]]; then
|
|
40
|
+
if [[ "$cur" == -* ]]; then
|
|
41
|
+
COMPREPLY=( $(compgen -W "$global_flags" -- "$cur") )
|
|
42
|
+
else
|
|
43
|
+
COMPREPLY=( $(compgen -W "$top_commands" -- "$cur") )
|
|
44
|
+
fi
|
|
45
|
+
return 0
|
|
46
|
+
fi
|
|
47
|
+
|
|
48
|
+
case "$cmd" in
|
|
49
|
+
login) _postman_login ;;
|
|
50
|
+
logout) _postman_logout ;;
|
|
51
|
+
collection) _postman_collection ;;
|
|
52
|
+
api) _postman_api ;;
|
|
53
|
+
runner) _postman_runner ;;
|
|
54
|
+
spec) _postman_spec ;;
|
|
55
|
+
monitor) _postman_monitor ;;
|
|
56
|
+
workspace) _postman_workspace ;;
|
|
57
|
+
performance) _postman_performance ;;
|
|
58
|
+
flows|fl) _postman_flows ;;
|
|
59
|
+
request) _postman_request ;;
|
|
60
|
+
sdk) _postman_sdk ;;
|
|
61
|
+
mock) _postman_mock ;;
|
|
62
|
+
application|app) _postman_application ;;
|
|
63
|
+
simulate) _postman_simulate ;;
|
|
64
|
+
context) _postman_context ;;
|
|
65
|
+
search) _postman_search ;;
|
|
66
|
+
webhook) _postman_webhook ;;
|
|
67
|
+
esac
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
_postman_login() {
|
|
71
|
+
if [[ "$cur" == -* ]]; then
|
|
72
|
+
COMPREPLY=( $(compgen -W "--alias --with-api-key --region --verbose -h --help" -- "$cur") )
|
|
73
|
+
return 0
|
|
74
|
+
fi
|
|
75
|
+
case "$prev" in
|
|
76
|
+
--region)
|
|
77
|
+
COMPREPLY=( $(compgen -W "us eu" -- "$cur") )
|
|
78
|
+
return 0 ;;
|
|
79
|
+
esac
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
_postman_logout() {
|
|
83
|
+
if [[ "$cur" == -* ]]; then
|
|
84
|
+
COMPREPLY=( $(compgen -W "--alias -h --help" -- "$cur") )
|
|
85
|
+
return 0
|
|
86
|
+
fi
|
|
87
|
+
case "$prev" in
|
|
88
|
+
esac
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
_postman_collection() {
|
|
92
|
+
if [[ -z "$subcmd" ]]; then
|
|
93
|
+
if [[ "$cur" == -* ]]; then
|
|
94
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
95
|
+
else
|
|
96
|
+
COMPREPLY=( $(compgen -W "migrate lint ai-readiness run" -- "$cur") )
|
|
97
|
+
fi
|
|
98
|
+
return 0
|
|
99
|
+
fi
|
|
100
|
+
case "$subcmd" in
|
|
101
|
+
migrate) _postman_collection_migrate ;;
|
|
102
|
+
lint) _postman_collection_lint ;;
|
|
103
|
+
ai-readiness) _postman_collection_ai_readiness ;;
|
|
104
|
+
run) _postman_collection_run ;;
|
|
105
|
+
esac
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
_postman_collection_migrate() {
|
|
109
|
+
if [[ "$cur" == -* ]]; then
|
|
110
|
+
COMPREPLY=( $(compgen -W "-o --output -h --help" -- "$cur") )
|
|
111
|
+
return 0
|
|
112
|
+
fi
|
|
113
|
+
case "$prev" in
|
|
114
|
+
-o|--output)
|
|
115
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
116
|
+
return 0 ;;
|
|
117
|
+
esac
|
|
118
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
_postman_collection_lint() {
|
|
122
|
+
if [[ "$cur" == -* ]]; then
|
|
123
|
+
COMPREPLY=( $(compgen -W "-f --fail-severity -r --reporter -h --help" -- "$cur") )
|
|
124
|
+
return 0
|
|
125
|
+
fi
|
|
126
|
+
case "$prev" in
|
|
127
|
+
esac
|
|
128
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
_postman_collection_ai_readiness() {
|
|
132
|
+
if [[ "$cur" == -* ]]; then
|
|
133
|
+
COMPREPLY=( $(compgen -W "-o --output --min-score -h --help" -- "$cur") )
|
|
134
|
+
return 0
|
|
135
|
+
fi
|
|
136
|
+
case "$prev" in
|
|
137
|
+
esac
|
|
138
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
_postman_collection_run() {
|
|
142
|
+
if [[ "$cur" == -* ]]; then
|
|
143
|
+
COMPREPLY=( $(compgen -W "-e --environment -g --globals -r --reporters --reporter-json-structure -n --iteration-count -d --iteration-data -i --global-var --env-var --integration-id --postman-api-key --alias --bail --ignore-redirects -x --suppress-exit-code --silent --disable-unicode --delay-request --timeout --timeout-request --timeout-script --working-dir --no-insecure-file-read -k --insecure --ssl-client-cert-list --ssl-client-cert --ssl-client-key --ssl-client-passphrase --ssl-extra-ca-certs --cookie-jar --export-cookie-jar --verbose --mock --simulate -h --help --reporter-json-export --reporter-junit-export --reporter-html-export --reporter-json-omitRequestBodies --reporter-html-omitRequestBodies --reporter-json-omitResponseBodies --reporter-html-omitResponseBodies --reporter-json-omitHeaders --reporter-html-omitHeaders --reporter-json-omitAllHeadersAndBody --reporter-html-omitAllHeadersAndBody" -- "$cur") )
|
|
144
|
+
return 0
|
|
145
|
+
fi
|
|
146
|
+
case "$prev" in
|
|
147
|
+
-e|--environment)
|
|
148
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
149
|
+
return 0 ;;
|
|
150
|
+
-g|--globals)
|
|
151
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
152
|
+
return 0 ;;
|
|
153
|
+
-r|--reporters)
|
|
154
|
+
COMPREPLY=( $(compgen -W "cli json junit html" -- "$cur") )
|
|
155
|
+
return 0 ;;
|
|
156
|
+
-d|--iteration-data)
|
|
157
|
+
_postman_filematch '!*.@(json|csv)' "$cur"
|
|
158
|
+
return 0 ;;
|
|
159
|
+
--bail)
|
|
160
|
+
COMPREPLY=( $(compgen -W "folder failure" -- "$cur") )
|
|
161
|
+
return 0 ;;
|
|
162
|
+
--working-dir)
|
|
163
|
+
COMPREPLY=( $(compgen -d -- "$cur") )
|
|
164
|
+
return 0 ;;
|
|
165
|
+
--ssl-client-cert-list)
|
|
166
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
167
|
+
return 0 ;;
|
|
168
|
+
--ssl-client-cert)
|
|
169
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
170
|
+
return 0 ;;
|
|
171
|
+
--ssl-client-key)
|
|
172
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
173
|
+
return 0 ;;
|
|
174
|
+
--ssl-extra-ca-certs)
|
|
175
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
176
|
+
return 0 ;;
|
|
177
|
+
--cookie-jar)
|
|
178
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
179
|
+
return 0 ;;
|
|
180
|
+
--export-cookie-jar)
|
|
181
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
182
|
+
return 0 ;;
|
|
183
|
+
--mock)
|
|
184
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
185
|
+
return 0 ;;
|
|
186
|
+
--simulate)
|
|
187
|
+
_postman_filematch '!*.@(sim.yaml|yaml|yml)' "$cur"
|
|
188
|
+
return 0 ;;
|
|
189
|
+
--reporter-json-export)
|
|
190
|
+
_postman_filematch '!*.@(json|xml|html)' "$cur"
|
|
191
|
+
return 0 ;;
|
|
192
|
+
--reporter-junit-export)
|
|
193
|
+
_postman_filematch '!*.@(json|xml|html)' "$cur"
|
|
194
|
+
return 0 ;;
|
|
195
|
+
--reporter-html-export)
|
|
196
|
+
_postman_filematch '!*.@(json|xml|html)' "$cur"
|
|
197
|
+
return 0 ;;
|
|
198
|
+
esac
|
|
199
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
_postman_api() {
|
|
203
|
+
if [[ -z "$subcmd" ]]; then
|
|
204
|
+
if [[ "$cur" == -* ]]; then
|
|
205
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
206
|
+
else
|
|
207
|
+
COMPREPLY=( $(compgen -W "lint publish" -- "$cur") )
|
|
208
|
+
fi
|
|
209
|
+
return 0
|
|
210
|
+
fi
|
|
211
|
+
case "$subcmd" in
|
|
212
|
+
lint) _postman_api_lint ;;
|
|
213
|
+
publish) _postman_api_publish ;;
|
|
214
|
+
esac
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
_postman_api_lint() {
|
|
218
|
+
if [[ "$cur" == -* ]]; then
|
|
219
|
+
COMPREPLY=( $(compgen -W "--integration-id -f --fail-severity -x --suppress-exit-code -h --help" -- "$cur") )
|
|
220
|
+
return 0
|
|
221
|
+
fi
|
|
222
|
+
case "$prev" in
|
|
223
|
+
esac
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
_postman_api_publish() {
|
|
227
|
+
if [[ "$cur" == -* ]]; then
|
|
228
|
+
COMPREPLY=( $(compgen -W "--name --release-notes --collections --api-definition --do-not-poll -x --suppress-exit-code -h --help" -- "$cur") )
|
|
229
|
+
return 0
|
|
230
|
+
fi
|
|
231
|
+
case "$prev" in
|
|
232
|
+
--collections)
|
|
233
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
234
|
+
return 0 ;;
|
|
235
|
+
esac
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
_postman_runner() {
|
|
239
|
+
if [[ -z "$subcmd" ]]; then
|
|
240
|
+
if [[ "$cur" == -* ]]; then
|
|
241
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
242
|
+
else
|
|
243
|
+
COMPREPLY=( $(compgen -W "start" -- "$cur") )
|
|
244
|
+
fi
|
|
245
|
+
return 0
|
|
246
|
+
fi
|
|
247
|
+
case "$subcmd" in
|
|
248
|
+
start) _postman_runner_start ;;
|
|
249
|
+
esac
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
_postman_runner_start() {
|
|
253
|
+
if [[ "$cur" == -* ]]; then
|
|
254
|
+
COMPREPLY=( $(compgen -W "--id --key --region --proxy --egress-proxy --egress-proxy-authz-url --ssl-extra-ca-certs --metrics --metrics-port -h --help" -- "$cur") )
|
|
255
|
+
return 0
|
|
256
|
+
fi
|
|
257
|
+
case "$prev" in
|
|
258
|
+
--key)
|
|
259
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
260
|
+
return 0 ;;
|
|
261
|
+
--ssl-extra-ca-certs)
|
|
262
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
263
|
+
return 0 ;;
|
|
264
|
+
esac
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
_postman_spec() {
|
|
268
|
+
if [[ -z "$subcmd" ]]; then
|
|
269
|
+
if [[ "$cur" == -* ]]; then
|
|
270
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
271
|
+
else
|
|
272
|
+
COMPREPLY=( $(compgen -W "lint ai-readiness" -- "$cur") )
|
|
273
|
+
fi
|
|
274
|
+
return 0
|
|
275
|
+
fi
|
|
276
|
+
case "$subcmd" in
|
|
277
|
+
lint) _postman_spec_lint ;;
|
|
278
|
+
ai-readiness) _postman_spec_ai_readiness ;;
|
|
279
|
+
esac
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
_postman_spec_lint() {
|
|
283
|
+
if [[ "$cur" == -* ]]; then
|
|
284
|
+
COMPREPLY=( $(compgen -W "-f --fail-severity -o --output --workspace-id -h --help" -- "$cur") )
|
|
285
|
+
return 0
|
|
286
|
+
fi
|
|
287
|
+
case "$prev" in
|
|
288
|
+
esac
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
_postman_spec_ai_readiness() {
|
|
292
|
+
if [[ "$cur" == -* ]]; then
|
|
293
|
+
COMPREPLY=( $(compgen -W "-o --output --min-score -h --help" -- "$cur") )
|
|
294
|
+
return 0
|
|
295
|
+
fi
|
|
296
|
+
case "$prev" in
|
|
297
|
+
esac
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
_postman_monitor() {
|
|
301
|
+
if [[ -z "$subcmd" ]]; then
|
|
302
|
+
if [[ "$cur" == -* ]]; then
|
|
303
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
304
|
+
else
|
|
305
|
+
COMPREPLY=( $(compgen -W "run" -- "$cur") )
|
|
306
|
+
fi
|
|
307
|
+
return 0
|
|
308
|
+
fi
|
|
309
|
+
case "$subcmd" in
|
|
310
|
+
run) _postman_monitor_run ;;
|
|
311
|
+
esac
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
_postman_monitor_run() {
|
|
315
|
+
if [[ "$cur" == -* ]]; then
|
|
316
|
+
COMPREPLY=( $(compgen -W "-x --suppress-exit-code -t --timeout -h --help" -- "$cur") )
|
|
317
|
+
return 0
|
|
318
|
+
fi
|
|
319
|
+
case "$prev" in
|
|
320
|
+
esac
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
_postman_workspace() {
|
|
324
|
+
if [[ -z "$subcmd" ]]; then
|
|
325
|
+
if [[ "$cur" == -* ]]; then
|
|
326
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
327
|
+
else
|
|
328
|
+
COMPREPLY=( $(compgen -W "prepare push" -- "$cur") )
|
|
329
|
+
fi
|
|
330
|
+
return 0
|
|
331
|
+
fi
|
|
332
|
+
case "$subcmd" in
|
|
333
|
+
prepare) _postman_workspace_prepare ;;
|
|
334
|
+
push) _postman_workspace_push ;;
|
|
335
|
+
esac
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
_postman_workspace_prepare() {
|
|
339
|
+
if [[ "$cur" == -* ]]; then
|
|
340
|
+
COMPREPLY=( $(compgen -W "--collections-dir --environments-dir -h --help" -- "$cur") )
|
|
341
|
+
return 0
|
|
342
|
+
fi
|
|
343
|
+
case "$prev" in
|
|
344
|
+
--collections-dir)
|
|
345
|
+
COMPREPLY=( $(compgen -d -- "$cur") )
|
|
346
|
+
return 0 ;;
|
|
347
|
+
--environments-dir)
|
|
348
|
+
COMPREPLY=( $(compgen -d -- "$cur") )
|
|
349
|
+
return 0 ;;
|
|
350
|
+
esac
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
_postman_workspace_push() {
|
|
354
|
+
if [[ "$cur" == -* ]]; then
|
|
355
|
+
COMPREPLY=( $(compgen -W "--collections-dir --environments-dir --no-prepare -y --yes -h --help" -- "$cur") )
|
|
356
|
+
return 0
|
|
357
|
+
fi
|
|
358
|
+
case "$prev" in
|
|
359
|
+
--collections-dir)
|
|
360
|
+
COMPREPLY=( $(compgen -d -- "$cur") )
|
|
361
|
+
return 0 ;;
|
|
362
|
+
--environments-dir)
|
|
363
|
+
COMPREPLY=( $(compgen -d -- "$cur") )
|
|
364
|
+
return 0 ;;
|
|
365
|
+
esac
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
_postman_performance() {
|
|
369
|
+
if [[ -z "$subcmd" ]]; then
|
|
370
|
+
if [[ "$cur" == -* ]]; then
|
|
371
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
372
|
+
else
|
|
373
|
+
COMPREPLY=( $(compgen -W "run" -- "$cur") )
|
|
374
|
+
fi
|
|
375
|
+
return 0
|
|
376
|
+
fi
|
|
377
|
+
case "$subcmd" in
|
|
378
|
+
run) _postman_performance_run ;;
|
|
379
|
+
esac
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
_postman_performance_run() {
|
|
383
|
+
if [[ "$cur" == -* ]]; then
|
|
384
|
+
COMPREPLY=( $(compgen -W "-e --environment -g --globals --vu-count -d --duration -p --load-profile --data-file --postman-api-key --pass-if -h --help" -- "$cur") )
|
|
385
|
+
return 0
|
|
386
|
+
fi
|
|
387
|
+
case "$prev" in
|
|
388
|
+
--data-file)
|
|
389
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
390
|
+
return 0 ;;
|
|
391
|
+
esac
|
|
392
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
_postman_flows() {
|
|
396
|
+
if [[ -z "$subcmd" ]]; then
|
|
397
|
+
if [[ "$cur" == -* ]]; then
|
|
398
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
399
|
+
else
|
|
400
|
+
COMPREPLY=( $(compgen -W "list trigger deploy run update list-runs get-run" -- "$cur") )
|
|
401
|
+
fi
|
|
402
|
+
return 0
|
|
403
|
+
fi
|
|
404
|
+
case "$subcmd" in
|
|
405
|
+
list) _postman_flows_list ;;
|
|
406
|
+
trigger) _postman_flows_trigger ;;
|
|
407
|
+
deploy) _postman_flows_deploy ;;
|
|
408
|
+
run) _postman_flows_run ;;
|
|
409
|
+
update) _postman_flows_update ;;
|
|
410
|
+
list-runs) _postman_flows_list_runs ;;
|
|
411
|
+
get-run) _postman_flows_get_run ;;
|
|
412
|
+
esac
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
_postman_flows_list() {
|
|
416
|
+
if [[ "$cur" == -* ]]; then
|
|
417
|
+
COMPREPLY=( $(compgen -W "-w --workspace -p --paginate -f --filter -s --sort --verbose --debug --json -h --help" -- "$cur") )
|
|
418
|
+
return 0
|
|
419
|
+
fi
|
|
420
|
+
case "$prev" in
|
|
421
|
+
esac
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
_postman_flows_trigger() {
|
|
425
|
+
if [[ "$cur" == -* ]]; then
|
|
426
|
+
COMPREPLY=( $(compgen -W "-i --input -f --input-file -q --query --headers -n --dry-run --show-secrets -r --result -s --scenario --verbose --debug --json -h --help" -- "$cur") )
|
|
427
|
+
return 0
|
|
428
|
+
fi
|
|
429
|
+
case "$prev" in
|
|
430
|
+
-i|--input)
|
|
431
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
432
|
+
return 0 ;;
|
|
433
|
+
-f|--input-file)
|
|
434
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
435
|
+
return 0 ;;
|
|
436
|
+
-q|--query)
|
|
437
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
438
|
+
return 0 ;;
|
|
439
|
+
--headers)
|
|
440
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
441
|
+
return 0 ;;
|
|
442
|
+
esac
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
_postman_flows_deploy() {
|
|
446
|
+
if [[ "$cur" == -* ]]; then
|
|
447
|
+
COMPREPLY=( $(compgen -W "-p --path -t --timeout -a --auth --verbose --debug --json -h --help" -- "$cur") )
|
|
448
|
+
return 0
|
|
449
|
+
fi
|
|
450
|
+
case "$prev" in
|
|
451
|
+
-p|--path)
|
|
452
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
453
|
+
return 0 ;;
|
|
454
|
+
esac
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
_postman_flows_run() {
|
|
458
|
+
if [[ "$cur" == -* ]]; then
|
|
459
|
+
COMPREPLY=( $(compgen -W "-i --input -f --input-file -s --scenario -e --environment --working-dir --verbose --no-truncate --output --reporters -x --suppress-exit-code --workspace --verbose --debug --json -h --help" -- "$cur") )
|
|
460
|
+
return 0
|
|
461
|
+
fi
|
|
462
|
+
case "$prev" in
|
|
463
|
+
-i|--input)
|
|
464
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
465
|
+
return 0 ;;
|
|
466
|
+
-f|--input-file)
|
|
467
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
468
|
+
return 0 ;;
|
|
469
|
+
-e|--environment)
|
|
470
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
471
|
+
return 0 ;;
|
|
472
|
+
--working-dir)
|
|
473
|
+
COMPREPLY=( $(compgen -d -- "$cur") )
|
|
474
|
+
return 0 ;;
|
|
475
|
+
esac
|
|
476
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
_postman_flows_update() {
|
|
480
|
+
if [[ "$cur" == -* ]]; then
|
|
481
|
+
COMPREPLY=( $(compgen -W "-t --trigger -a --auth --verbose --debug --json -h --help" -- "$cur") )
|
|
482
|
+
return 0
|
|
483
|
+
fi
|
|
484
|
+
case "$prev" in
|
|
485
|
+
esac
|
|
486
|
+
}
|
|
487
|
+
|
|
488
|
+
_postman_flows_list_runs() {
|
|
489
|
+
if [[ "$cur" == -* ]]; then
|
|
490
|
+
COMPREPLY=( $(compgen -W "-w --workspace -f --flow -r --range --verbose --debug --json -h --help" -- "$cur") )
|
|
491
|
+
return 0
|
|
492
|
+
fi
|
|
493
|
+
case "$prev" in
|
|
494
|
+
esac
|
|
495
|
+
}
|
|
496
|
+
|
|
497
|
+
_postman_flows_get_run() {
|
|
498
|
+
if [[ "$cur" == -* ]]; then
|
|
499
|
+
COMPREPLY=( $(compgen -W "-r --run-id -l --logs --filter --verbose --debug --json -h --help" -- "$cur") )
|
|
500
|
+
return 0
|
|
501
|
+
fi
|
|
502
|
+
case "$prev" in
|
|
503
|
+
esac
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
_postman_request() {
|
|
507
|
+
if [[ "$cur" == -* ]]; then
|
|
508
|
+
COMPREPLY=( $(compgen -W "-H --header -d --body -f --form -e --environment --timeout --redirects-ignore --redirects-max --redirects-follow-method --redirects-remove-referrer --retry --retry-delay --script-pre-request --script-post-request -o --output --verbose --response-only --debug -h --help --auth-basic-username --auth-basic-password --auth-bearer-token --auth-digest-username --auth-digest-password --auth-oauth1-consumerKey --auth-oauth1-consumerSecret --auth-oauth1-token --auth-oauth1-tokenSecret --auth-oauth2-accessToken --auth-oauth2-tokenType --auth-hawk-authId --auth-hawk-authKey --auth-hawk-algorithm --auth-aws-accessKey --auth-aws-secretKey --auth-aws-region --auth-aws-service --auth-aws-sessionToken --auth-ntlm-username --auth-ntlm-password --auth-ntlm-domain --auth-ntlm-workstation --auth-apikey-key --auth-apikey-value --auth-apikey-in" -- "$cur") )
|
|
509
|
+
return 0
|
|
510
|
+
fi
|
|
511
|
+
case "$prev" in
|
|
512
|
+
-e|--environment)
|
|
513
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
514
|
+
return 0 ;;
|
|
515
|
+
-o|--output)
|
|
516
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
517
|
+
return 0 ;;
|
|
518
|
+
esac
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
_postman_sdk() {
|
|
522
|
+
if [[ -z "$subcmd" ]]; then
|
|
523
|
+
if [[ "$cur" == -* ]]; then
|
|
524
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
525
|
+
else
|
|
526
|
+
COMPREPLY=( $(compgen -W "init generate build track list ls fetch get connect connections" -- "$cur") )
|
|
527
|
+
fi
|
|
528
|
+
return 0
|
|
529
|
+
fi
|
|
530
|
+
case "$subcmd" in
|
|
531
|
+
init) _postman_sdk_init ;;
|
|
532
|
+
generate|build) _postman_sdk_generate ;;
|
|
533
|
+
track) _postman_sdk_track ;;
|
|
534
|
+
list|ls) _postman_sdk_list ;;
|
|
535
|
+
fetch|get) _postman_sdk_fetch ;;
|
|
536
|
+
connect) _postman_sdk_connect ;;
|
|
537
|
+
connections) _postman_sdk_connections ;;
|
|
538
|
+
esac
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
_postman_sdk_init() {
|
|
542
|
+
if [[ "$cur" == -* ]]; then
|
|
543
|
+
COMPREPLY=( $(compgen -W "-y --yes -h --help" -- "$cur") )
|
|
544
|
+
return 0
|
|
545
|
+
fi
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
_postman_sdk_generate() {
|
|
549
|
+
if [[ "$cur" == -* ]]; then
|
|
550
|
+
COMPREPLY=( $(compgen -W "-l --language --all -o --output-dir --name --sdk-version --config -y --yes --overwrite --verbose --log-level --no-track-changes --no-merge --conflict-strategy --no-emit -h --help" -- "$cur") )
|
|
551
|
+
return 0
|
|
552
|
+
fi
|
|
553
|
+
case "$prev" in
|
|
554
|
+
-o|--output-dir)
|
|
555
|
+
COMPREPLY=( $(compgen -d -- "$cur") )
|
|
556
|
+
return 0 ;;
|
|
557
|
+
--config)
|
|
558
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
559
|
+
return 0 ;;
|
|
560
|
+
esac
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
_postman_sdk_track() {
|
|
564
|
+
if [[ "$cur" == -* ]]; then
|
|
565
|
+
COMPREPLY=( $(compgen -W "-l --language -o --output-dir -h --help" -- "$cur") )
|
|
566
|
+
return 0
|
|
567
|
+
fi
|
|
568
|
+
case "$prev" in
|
|
569
|
+
-o|--output-dir)
|
|
570
|
+
COMPREPLY=( $(compgen -d -- "$cur") )
|
|
571
|
+
return 0 ;;
|
|
572
|
+
esac
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
_postman_sdk_list() {
|
|
576
|
+
if [[ "$cur" == -* ]]; then
|
|
577
|
+
COMPREPLY=( $(compgen -W "-s --status -o --output --log-level -h --help" -- "$cur") )
|
|
578
|
+
return 0
|
|
579
|
+
fi
|
|
580
|
+
case "$prev" in
|
|
581
|
+
esac
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
_postman_sdk_fetch() {
|
|
585
|
+
if [[ "$cur" == -* ]]; then
|
|
586
|
+
COMPREPLY=( $(compgen -W "-o --output-dir -l --language --overwrite --verbose --log-level -h --help" -- "$cur") )
|
|
587
|
+
return 0
|
|
588
|
+
fi
|
|
589
|
+
case "$prev" in
|
|
590
|
+
-o|--output-dir)
|
|
591
|
+
COMPREPLY=( $(compgen -d -- "$cur") )
|
|
592
|
+
return 0 ;;
|
|
593
|
+
esac
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
_postman_sdk_connect() {
|
|
597
|
+
if [[ "$cur" == -* ]]; then
|
|
598
|
+
COMPREPLY=( $(compgen -W "-l --language -r --repo --repo-owner --repo-name -b --branch --push-to-base --enable-npm-publishing --auth-provider --verbose -h --help" -- "$cur") )
|
|
599
|
+
return 0
|
|
600
|
+
fi
|
|
601
|
+
case "$prev" in
|
|
602
|
+
esac
|
|
603
|
+
}
|
|
604
|
+
|
|
605
|
+
_postman_sdk_connections() {
|
|
606
|
+
if [[ -z "$subcmd" ]]; then
|
|
607
|
+
if [[ "$cur" == -* ]]; then
|
|
608
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
609
|
+
else
|
|
610
|
+
COMPREPLY=( $(compgen -W "list ls delete rm" -- "$cur") )
|
|
611
|
+
fi
|
|
612
|
+
return 0
|
|
613
|
+
fi
|
|
614
|
+
case "$subcmd" in
|
|
615
|
+
list|ls) _postman_sdk_connections_list ;;
|
|
616
|
+
delete|rm) _postman_sdk_connections_delete ;;
|
|
617
|
+
esac
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
_postman_sdk_connections_list() {
|
|
621
|
+
if [[ "$cur" == -* ]]; then
|
|
622
|
+
COMPREPLY=( $(compgen -W "--refresh --json --verbose -h --help" -- "$cur") )
|
|
623
|
+
return 0
|
|
624
|
+
fi
|
|
625
|
+
}
|
|
626
|
+
|
|
627
|
+
_postman_sdk_connections_delete() {
|
|
628
|
+
if [[ "$cur" == -* ]]; then
|
|
629
|
+
COMPREPLY=( $(compgen -W "-y --yes --verbose -h --help" -- "$cur") )
|
|
630
|
+
return 0
|
|
631
|
+
fi
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
_postman_mock() {
|
|
635
|
+
if [[ -z "$subcmd" ]]; then
|
|
636
|
+
if [[ "$cur" == -* ]]; then
|
|
637
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
638
|
+
else
|
|
639
|
+
COMPREPLY=( $(compgen -W "run" -- "$cur") )
|
|
640
|
+
fi
|
|
641
|
+
return 0
|
|
642
|
+
fi
|
|
643
|
+
case "$subcmd" in
|
|
644
|
+
run) _postman_mock_run ;;
|
|
645
|
+
esac
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
_postman_mock_run() {
|
|
649
|
+
if [[ "$cur" == -* ]]; then
|
|
650
|
+
COMPREPLY=( $(compgen -W "-e --environment -g --globals -h --help" -- "$cur") )
|
|
651
|
+
return 0
|
|
652
|
+
fi
|
|
653
|
+
case "$prev" in
|
|
654
|
+
-e|--environment)
|
|
655
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
656
|
+
return 0 ;;
|
|
657
|
+
-g|--globals)
|
|
658
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
659
|
+
return 0 ;;
|
|
660
|
+
esac
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
_postman_application() {
|
|
664
|
+
if [[ -z "$subcmd" ]]; then
|
|
665
|
+
if [[ "$cur" == -* ]]; then
|
|
666
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
667
|
+
else
|
|
668
|
+
COMPREPLY=( $(compgen -W "init test" -- "$cur") )
|
|
669
|
+
fi
|
|
670
|
+
return 0
|
|
671
|
+
fi
|
|
672
|
+
case "$subcmd" in
|
|
673
|
+
init) _postman_application_init ;;
|
|
674
|
+
test) _postman_application_test ;;
|
|
675
|
+
esac
|
|
676
|
+
}
|
|
677
|
+
|
|
678
|
+
_postman_application_init() {
|
|
679
|
+
if [[ "$cur" == -* ]]; then
|
|
680
|
+
COMPREPLY=( $(compgen -W "--target-collection --target-environment --filter-urlpatterns --filter-methods --filter-headers --command -h --help" -- "$cur") )
|
|
681
|
+
return 0
|
|
682
|
+
fi
|
|
683
|
+
case "$prev" in
|
|
684
|
+
esac
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
_postman_application_test() {
|
|
688
|
+
if [[ "$cur" == -* ]]; then
|
|
689
|
+
COMPREPLY=( $(compgen -W "--target --target-collection --target-environment --command --network-log --capture-only --output --force --report-events --verbose -h --help" -- "$cur") )
|
|
690
|
+
return 0
|
|
691
|
+
fi
|
|
692
|
+
case "$prev" in
|
|
693
|
+
--target-collection)
|
|
694
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
695
|
+
return 0 ;;
|
|
696
|
+
--target-environment)
|
|
697
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
698
|
+
return 0 ;;
|
|
699
|
+
--network-log)
|
|
700
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
701
|
+
return 0 ;;
|
|
702
|
+
--output)
|
|
703
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
704
|
+
return 0 ;;
|
|
705
|
+
esac
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
_postman_simulate() {
|
|
709
|
+
if [[ -z "$subcmd" ]]; then
|
|
710
|
+
if [[ "$cur" == -* ]]; then
|
|
711
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
712
|
+
else
|
|
713
|
+
COMPREPLY=( $(compgen -W "run" -- "$cur") )
|
|
714
|
+
fi
|
|
715
|
+
return 0
|
|
716
|
+
fi
|
|
717
|
+
case "$subcmd" in
|
|
718
|
+
run) _postman_simulate_run ;;
|
|
719
|
+
esac
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
_postman_simulate_run() {
|
|
723
|
+
if [[ "$cur" == -* ]]; then
|
|
724
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
725
|
+
return 0
|
|
726
|
+
fi
|
|
727
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
_postman_context() {
|
|
731
|
+
if [[ -z "$subcmd" ]]; then
|
|
732
|
+
if [[ "$cur" == -* ]]; then
|
|
733
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
734
|
+
else
|
|
735
|
+
COMPREPLY=( $(compgen -W "instructions collection request folder response workspace environment" -- "$cur") )
|
|
736
|
+
fi
|
|
737
|
+
return 0
|
|
738
|
+
fi
|
|
739
|
+
case "$subcmd" in
|
|
740
|
+
instructions) _postman_context_instructions ;;
|
|
741
|
+
collection) _postman_context_collection ;;
|
|
742
|
+
request) _postman_context_request ;;
|
|
743
|
+
folder) _postman_context_folder ;;
|
|
744
|
+
response) _postman_context_response ;;
|
|
745
|
+
workspace) _postman_context_workspace ;;
|
|
746
|
+
environment) _postman_context_environment ;;
|
|
747
|
+
esac
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
_postman_context_instructions() {
|
|
751
|
+
if [[ "$cur" == -* ]]; then
|
|
752
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
753
|
+
return 0
|
|
754
|
+
fi
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
_postman_context_collection() {
|
|
758
|
+
if [[ -z "$subcmd" ]]; then
|
|
759
|
+
if [[ "$cur" == -* ]]; then
|
|
760
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
761
|
+
else
|
|
762
|
+
COMPREPLY=( $(compgen -W "get" -- "$cur") )
|
|
763
|
+
fi
|
|
764
|
+
return 0
|
|
765
|
+
fi
|
|
766
|
+
case "$subcmd" in
|
|
767
|
+
get) _postman_context_collection_get ;;
|
|
768
|
+
esac
|
|
769
|
+
}
|
|
770
|
+
|
|
771
|
+
_postman_context_collection_get() {
|
|
772
|
+
if [[ "$cur" == -* ]]; then
|
|
773
|
+
COMPREPLY=( $(compgen -W "-c --collection-id -h --help" -- "$cur") )
|
|
774
|
+
return 0
|
|
775
|
+
fi
|
|
776
|
+
case "$prev" in
|
|
777
|
+
esac
|
|
778
|
+
}
|
|
779
|
+
|
|
780
|
+
_postman_context_request() {
|
|
781
|
+
if [[ -z "$subcmd" ]]; then
|
|
782
|
+
if [[ "$cur" == -* ]]; then
|
|
783
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
784
|
+
else
|
|
785
|
+
COMPREPLY=( $(compgen -W "get context" -- "$cur") )
|
|
786
|
+
fi
|
|
787
|
+
return 0
|
|
788
|
+
fi
|
|
789
|
+
case "$subcmd" in
|
|
790
|
+
get) _postman_context_request_get ;;
|
|
791
|
+
context) _postman_context_request_context ;;
|
|
792
|
+
esac
|
|
793
|
+
}
|
|
794
|
+
|
|
795
|
+
_postman_context_request_get() {
|
|
796
|
+
if [[ "$cur" == -* ]]; then
|
|
797
|
+
COMPREPLY=( $(compgen -W "-r --request-id -c --collection-id -h --help" -- "$cur") )
|
|
798
|
+
return 0
|
|
799
|
+
fi
|
|
800
|
+
case "$prev" in
|
|
801
|
+
esac
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
_postman_context_request_context() {
|
|
805
|
+
if [[ "$cur" == -* ]]; then
|
|
806
|
+
COMPREPLY=( $(compgen -W "-c --collection-id -r --request-id -h --help" -- "$cur") )
|
|
807
|
+
return 0
|
|
808
|
+
fi
|
|
809
|
+
case "$prev" in
|
|
810
|
+
esac
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
_postman_context_folder() {
|
|
814
|
+
if [[ -z "$subcmd" ]]; then
|
|
815
|
+
if [[ "$cur" == -* ]]; then
|
|
816
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
817
|
+
else
|
|
818
|
+
COMPREPLY=( $(compgen -W "get" -- "$cur") )
|
|
819
|
+
fi
|
|
820
|
+
return 0
|
|
821
|
+
fi
|
|
822
|
+
case "$subcmd" in
|
|
823
|
+
get) _postman_context_folder_get ;;
|
|
824
|
+
esac
|
|
825
|
+
}
|
|
826
|
+
|
|
827
|
+
_postman_context_folder_get() {
|
|
828
|
+
if [[ "$cur" == -* ]]; then
|
|
829
|
+
COMPREPLY=( $(compgen -W "--folder-id -c --collection-id -h --help" -- "$cur") )
|
|
830
|
+
return 0
|
|
831
|
+
fi
|
|
832
|
+
case "$prev" in
|
|
833
|
+
esac
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
_postman_context_response() {
|
|
837
|
+
if [[ -z "$subcmd" ]]; then
|
|
838
|
+
if [[ "$cur" == -* ]]; then
|
|
839
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
840
|
+
else
|
|
841
|
+
COMPREPLY=( $(compgen -W "get" -- "$cur") )
|
|
842
|
+
fi
|
|
843
|
+
return 0
|
|
844
|
+
fi
|
|
845
|
+
case "$subcmd" in
|
|
846
|
+
get) _postman_context_response_get ;;
|
|
847
|
+
esac
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
_postman_context_response_get() {
|
|
851
|
+
if [[ "$cur" == -* ]]; then
|
|
852
|
+
COMPREPLY=( $(compgen -W "--id -c --collection-id -r --request-id -h --help" -- "$cur") )
|
|
853
|
+
return 0
|
|
854
|
+
fi
|
|
855
|
+
case "$prev" in
|
|
856
|
+
esac
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
_postman_context_workspace() {
|
|
860
|
+
if [[ -z "$subcmd" ]]; then
|
|
861
|
+
if [[ "$cur" == -* ]]; then
|
|
862
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
863
|
+
else
|
|
864
|
+
COMPREPLY=( $(compgen -W "get" -- "$cur") )
|
|
865
|
+
fi
|
|
866
|
+
return 0
|
|
867
|
+
fi
|
|
868
|
+
case "$subcmd" in
|
|
869
|
+
get) _postman_context_workspace_get ;;
|
|
870
|
+
esac
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
_postman_context_workspace_get() {
|
|
874
|
+
if [[ "$cur" == -* ]]; then
|
|
875
|
+
COMPREPLY=( $(compgen -W "-w --workspace-id -h --help" -- "$cur") )
|
|
876
|
+
return 0
|
|
877
|
+
fi
|
|
878
|
+
case "$prev" in
|
|
879
|
+
esac
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
_postman_context_environment() {
|
|
883
|
+
if [[ -z "$subcmd" ]]; then
|
|
884
|
+
if [[ "$cur" == -* ]]; then
|
|
885
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
886
|
+
else
|
|
887
|
+
COMPREPLY=( $(compgen -W "get" -- "$cur") )
|
|
888
|
+
fi
|
|
889
|
+
return 0
|
|
890
|
+
fi
|
|
891
|
+
case "$subcmd" in
|
|
892
|
+
get) _postman_context_environment_get ;;
|
|
893
|
+
esac
|
|
894
|
+
}
|
|
895
|
+
|
|
896
|
+
_postman_context_environment_get() {
|
|
897
|
+
if [[ "$cur" == -* ]]; then
|
|
898
|
+
COMPREPLY=( $(compgen -W "-e --environment-id -h --help" -- "$cur") )
|
|
899
|
+
return 0
|
|
900
|
+
fi
|
|
901
|
+
case "$prev" in
|
|
902
|
+
esac
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
_postman_search() {
|
|
906
|
+
if [[ -z "$subcmd" ]]; then
|
|
907
|
+
if [[ "$cur" == -* ]]; then
|
|
908
|
+
COMPREPLY=( $(compgen -W "--ownership -n --limit --cursor -o --output --filter --filter-json -h --help" -- "$cur") )
|
|
909
|
+
else
|
|
910
|
+
COMPREPLY=( $(compgen -W "requests collections workspaces flows specs mocks environments" -- "$cur") )
|
|
911
|
+
fi
|
|
912
|
+
return 0
|
|
913
|
+
fi
|
|
914
|
+
case "$subcmd" in
|
|
915
|
+
requests) _postman_search_requests ;;
|
|
916
|
+
collections) _postman_search_collections ;;
|
|
917
|
+
workspaces) _postman_search_workspaces ;;
|
|
918
|
+
flows) _postman_search_flows ;;
|
|
919
|
+
specs) _postman_search_specs ;;
|
|
920
|
+
mocks) _postman_search_mocks ;;
|
|
921
|
+
environments) _postman_search_environments ;;
|
|
922
|
+
esac
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
_postman_search_requests() {
|
|
926
|
+
if [[ "$cur" == -* ]]; then
|
|
927
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
928
|
+
return 0
|
|
929
|
+
fi
|
|
930
|
+
}
|
|
931
|
+
|
|
932
|
+
_postman_search_collections() {
|
|
933
|
+
if [[ "$cur" == -* ]]; then
|
|
934
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
935
|
+
return 0
|
|
936
|
+
fi
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
_postman_search_workspaces() {
|
|
940
|
+
if [[ "$cur" == -* ]]; then
|
|
941
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
942
|
+
return 0
|
|
943
|
+
fi
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
_postman_search_flows() {
|
|
947
|
+
if [[ "$cur" == -* ]]; then
|
|
948
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
949
|
+
return 0
|
|
950
|
+
fi
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
_postman_search_specs() {
|
|
954
|
+
if [[ "$cur" == -* ]]; then
|
|
955
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
956
|
+
return 0
|
|
957
|
+
fi
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
_postman_search_mocks() {
|
|
961
|
+
if [[ "$cur" == -* ]]; then
|
|
962
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
963
|
+
return 0
|
|
964
|
+
fi
|
|
965
|
+
}
|
|
966
|
+
|
|
967
|
+
_postman_search_environments() {
|
|
968
|
+
if [[ "$cur" == -* ]]; then
|
|
969
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
970
|
+
return 0
|
|
971
|
+
fi
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
_postman_webhook() {
|
|
975
|
+
if [[ -z "$subcmd" ]]; then
|
|
976
|
+
if [[ "$cur" == -* ]]; then
|
|
977
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
978
|
+
else
|
|
979
|
+
COMPREPLY=( $(compgen -W "create start pause list delete status forward" -- "$cur") )
|
|
980
|
+
fi
|
|
981
|
+
return 0
|
|
982
|
+
fi
|
|
983
|
+
case "$subcmd" in
|
|
984
|
+
create) _postman_webhook_create ;;
|
|
985
|
+
start) _postman_webhook_start ;;
|
|
986
|
+
pause) _postman_webhook_pause ;;
|
|
987
|
+
list) _postman_webhook_list ;;
|
|
988
|
+
delete) _postman_webhook_delete ;;
|
|
989
|
+
status) _postman_webhook_status ;;
|
|
990
|
+
forward) _postman_webhook_forward ;;
|
|
991
|
+
esac
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
_postman_webhook_create() {
|
|
995
|
+
if [[ "$cur" == -* ]]; then
|
|
996
|
+
COMPREPLY=( $(compgen -W "-t --title -w --workspace --api-key -h --help" -- "$cur") )
|
|
997
|
+
return 0
|
|
998
|
+
fi
|
|
999
|
+
case "$prev" in
|
|
1000
|
+
--api-key)
|
|
1001
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
1002
|
+
return 0 ;;
|
|
1003
|
+
esac
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
_postman_webhook_start() {
|
|
1007
|
+
if [[ "$cur" == -* ]]; then
|
|
1008
|
+
COMPREPLY=( $(compgen -W "-w --workspace --api-key -h --help" -- "$cur") )
|
|
1009
|
+
return 0
|
|
1010
|
+
fi
|
|
1011
|
+
case "$prev" in
|
|
1012
|
+
--api-key)
|
|
1013
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
1014
|
+
return 0 ;;
|
|
1015
|
+
esac
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
_postman_webhook_pause() {
|
|
1019
|
+
if [[ "$cur" == -* ]]; then
|
|
1020
|
+
COMPREPLY=( $(compgen -W "-w --workspace --api-key -h --help" -- "$cur") )
|
|
1021
|
+
return 0
|
|
1022
|
+
fi
|
|
1023
|
+
case "$prev" in
|
|
1024
|
+
--api-key)
|
|
1025
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
1026
|
+
return 0 ;;
|
|
1027
|
+
esac
|
|
1028
|
+
}
|
|
1029
|
+
|
|
1030
|
+
_postman_webhook_list() {
|
|
1031
|
+
if [[ "$cur" == -* ]]; then
|
|
1032
|
+
COMPREPLY=( $(compgen -W "-w --workspace --api-key -h --help" -- "$cur") )
|
|
1033
|
+
return 0
|
|
1034
|
+
fi
|
|
1035
|
+
case "$prev" in
|
|
1036
|
+
--api-key)
|
|
1037
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
1038
|
+
return 0 ;;
|
|
1039
|
+
esac
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
_postman_webhook_delete() {
|
|
1043
|
+
if [[ "$cur" == -* ]]; then
|
|
1044
|
+
COMPREPLY=( $(compgen -W "-w --workspace --api-key -h --help" -- "$cur") )
|
|
1045
|
+
return 0
|
|
1046
|
+
fi
|
|
1047
|
+
case "$prev" in
|
|
1048
|
+
--api-key)
|
|
1049
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
1050
|
+
return 0 ;;
|
|
1051
|
+
esac
|
|
1052
|
+
}
|
|
1053
|
+
|
|
1054
|
+
_postman_webhook_status() {
|
|
1055
|
+
if [[ "$cur" == -* ]]; then
|
|
1056
|
+
COMPREPLY=( $(compgen -W "-w --workspace --api-key -h --help" -- "$cur") )
|
|
1057
|
+
return 0
|
|
1058
|
+
fi
|
|
1059
|
+
case "$prev" in
|
|
1060
|
+
--api-key)
|
|
1061
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
1062
|
+
return 0 ;;
|
|
1063
|
+
esac
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
_postman_webhook_forward() {
|
|
1067
|
+
if [[ "$cur" == -* ]]; then
|
|
1068
|
+
COMPREPLY=( $(compgen -W "-w --workspace --api-key -h --help" -- "$cur") )
|
|
1069
|
+
return 0
|
|
1070
|
+
fi
|
|
1071
|
+
case "$prev" in
|
|
1072
|
+
--api-key)
|
|
1073
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
1074
|
+
return 0 ;;
|
|
1075
|
+
esac
|
|
1076
|
+
}
|
|
1077
|
+
|
|
1078
|
+
complete -F _postman postman
|