postman-cli-completion 1.46.0 → 1.47.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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Bash completion for Postman CLI (postman v1.
|
|
1
|
+
# Bash completion for Postman CLI (postman v1.47.2)
|
|
2
2
|
# Auto-generated by scripts/generate.mjs — DO NOT EDIT
|
|
3
3
|
# Source: spec/commands.json
|
|
4
4
|
# https://github.com/yokawasa/postman-cli-completion
|
|
@@ -22,7 +22,7 @@ _postman() {
|
|
|
22
22
|
cur="${COMP_WORDS[COMP_CWORD]}"
|
|
23
23
|
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
24
24
|
|
|
25
|
-
local top_commands="login logout collection api runner spec monitor workspace ws performance flows fl request sdk mock application app simulate context search webhook dataset"
|
|
25
|
+
local top_commands="login logout collection environment globals api runner spec monitor workspace ws performance flows fl request sdk mock application app simulate context search webhook dataset"
|
|
26
26
|
local global_flags="-v --version --silent --color -h --help -h --help"
|
|
27
27
|
|
|
28
28
|
local i cmd="" subcmd=""
|
|
@@ -49,6 +49,8 @@ _postman() {
|
|
|
49
49
|
login) _postman_login ;;
|
|
50
50
|
logout) _postman_logout ;;
|
|
51
51
|
collection) _postman_collection ;;
|
|
52
|
+
environment) _postman_environment ;;
|
|
53
|
+
globals) _postman_globals ;;
|
|
52
54
|
api) _postman_api ;;
|
|
53
55
|
runner) _postman_runner ;;
|
|
54
56
|
spec) _postman_spec ;;
|
|
@@ -141,7 +143,7 @@ _postman_collection_ai_readiness() {
|
|
|
141
143
|
|
|
142
144
|
_postman_collection_run() {
|
|
143
145
|
if [[ "$cur" == -* ]]; then
|
|
144
|
-
COMPREPLY=( $(compgen -W "-e --environment -g --globals -r --reporters --output --reporter-json-structure -n --iteration-count -d --iteration-data --iteration-data-dataset --iteration-data-view --dataset -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 --report-events -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") )
|
|
146
|
+
COMPREPLY=( $(compgen -W "-e --environment -g --globals -r --reporters --output --reporter-json-structure -n --iteration-count -d --iteration-data --iteration-data-dataset --iteration-data-view --dataset -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 --port --simulate --report-events -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") )
|
|
145
147
|
return 0
|
|
146
148
|
fi
|
|
147
149
|
case "$prev" in
|
|
@@ -206,6 +208,54 @@ _postman_collection_run() {
|
|
|
206
208
|
_postman_filematch '!*.@(json)' "$cur"
|
|
207
209
|
}
|
|
208
210
|
|
|
211
|
+
_postman_environment() {
|
|
212
|
+
if [[ -z "$subcmd" ]]; then
|
|
213
|
+
if [[ "$cur" == -* ]]; then
|
|
214
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
215
|
+
else
|
|
216
|
+
COMPREPLY=( $(compgen -W "lint" -- "$cur") )
|
|
217
|
+
fi
|
|
218
|
+
return 0
|
|
219
|
+
fi
|
|
220
|
+
case "$subcmd" in
|
|
221
|
+
lint) _postman_environment_lint ;;
|
|
222
|
+
esac
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
_postman_environment_lint() {
|
|
226
|
+
if [[ "$cur" == -* ]]; then
|
|
227
|
+
COMPREPLY=( $(compgen -W "-f --fail-severity -o --output -h --help" -- "$cur") )
|
|
228
|
+
return 0
|
|
229
|
+
fi
|
|
230
|
+
case "$prev" in
|
|
231
|
+
esac
|
|
232
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
_postman_globals() {
|
|
236
|
+
if [[ -z "$subcmd" ]]; then
|
|
237
|
+
if [[ "$cur" == -* ]]; then
|
|
238
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
239
|
+
else
|
|
240
|
+
COMPREPLY=( $(compgen -W "lint" -- "$cur") )
|
|
241
|
+
fi
|
|
242
|
+
return 0
|
|
243
|
+
fi
|
|
244
|
+
case "$subcmd" in
|
|
245
|
+
lint) _postman_globals_lint ;;
|
|
246
|
+
esac
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
_postman_globals_lint() {
|
|
250
|
+
if [[ "$cur" == -* ]]; then
|
|
251
|
+
COMPREPLY=( $(compgen -W "-f --fail-severity -o --output -h --help" -- "$cur") )
|
|
252
|
+
return 0
|
|
253
|
+
fi
|
|
254
|
+
case "$prev" in
|
|
255
|
+
esac
|
|
256
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
257
|
+
}
|
|
258
|
+
|
|
209
259
|
_postman_api() {
|
|
210
260
|
if [[ -z "$subcmd" ]]; then
|
|
211
261
|
if [[ "$cur" == -* ]]; then
|
|
@@ -642,18 +692,34 @@ _postman_mock() {
|
|
|
642
692
|
if [[ "$cur" == -* ]]; then
|
|
643
693
|
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
644
694
|
else
|
|
645
|
-
COMPREPLY=( $(compgen -W "run" -- "$cur") )
|
|
695
|
+
COMPREPLY=( $(compgen -W "generate run" -- "$cur") )
|
|
646
696
|
fi
|
|
647
697
|
return 0
|
|
648
698
|
fi
|
|
649
699
|
case "$subcmd" in
|
|
700
|
+
generate) _postman_mock_generate ;;
|
|
650
701
|
run) _postman_mock_run ;;
|
|
651
702
|
esac
|
|
652
703
|
}
|
|
653
704
|
|
|
705
|
+
_postman_mock_generate() {
|
|
706
|
+
if [[ "$cur" == -* ]]; then
|
|
707
|
+
COMPREPLY=( $(compgen -W "-o --output --name --port --force -u --update -x --suppress-exit-code -h --help" -- "$cur") )
|
|
708
|
+
return 0
|
|
709
|
+
fi
|
|
710
|
+
case "$prev" in
|
|
711
|
+
-o|--output)
|
|
712
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
713
|
+
return 0 ;;
|
|
714
|
+
-u|--update)
|
|
715
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
716
|
+
return 0 ;;
|
|
717
|
+
esac
|
|
718
|
+
}
|
|
719
|
+
|
|
654
720
|
_postman_mock_run() {
|
|
655
721
|
if [[ "$cur" == -* ]]; then
|
|
656
|
-
COMPREPLY=( $(compgen -W "-e --environment -g --globals -h --help" -- "$cur") )
|
|
722
|
+
COMPREPLY=( $(compgen -W "-e --environment -g --globals -p --port -h --help" -- "$cur") )
|
|
657
723
|
return 0
|
|
658
724
|
fi
|
|
659
725
|
case "$prev" in
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
# Fish completion for Postman CLI (postman v1.
|
|
1
|
+
# Fish completion for Postman CLI (postman v1.47.2)
|
|
2
2
|
# Auto-generated by scripts/generate.mjs — DO NOT EDIT
|
|
3
3
|
# Source: spec/commands.json
|
|
4
4
|
# https://github.com/yokawasa/postman-cli-completion
|
|
5
5
|
|
|
6
6
|
function __postman_no_subcommand
|
|
7
|
-
not __fish_seen_subcommand_from login logout collection api runner spec monitor workspace ws performance flows fl request sdk mock application app simulate context search webhook dataset
|
|
7
|
+
not __fish_seen_subcommand_from login logout collection environment globals api runner spec monitor workspace ws performance flows fl request sdk mock application app simulate context search webhook dataset
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
function __postman_using_subcommand
|
|
@@ -24,6 +24,8 @@ complete -c postman -n __postman_no_subcommand -s h -l help -d 'display help for
|
|
|
24
24
|
complete -c postman -n __postman_no_subcommand -a login -d 'Authenticate with Postman to access your resources.'
|
|
25
25
|
complete -c postman -n __postman_no_subcommand -a logout -d 'Delete the stored Postman API key.'
|
|
26
26
|
complete -c postman -n __postman_no_subcommand -a collection -d 'Run and test your Postman collections directly from the command line.'
|
|
27
|
+
complete -c postman -n __postman_no_subcommand -a environment -d 'Work with local Postman environments from the command line.'
|
|
28
|
+
complete -c postman -n __postman_no_subcommand -a globals -d 'Work with local Postman globals from the command line.'
|
|
27
29
|
complete -c postman -n __postman_no_subcommand -a api -d 'Publish and test your APIs directly from the command line'
|
|
28
30
|
complete -c postman -n __postman_no_subcommand -a runner -d 'Run runners on your own environments for monitoring your APIs'
|
|
29
31
|
complete -c postman -n __postman_no_subcommand -a spec -d 'Lint and validate Specifications from the command line'
|
|
@@ -113,6 +115,7 @@ complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_
|
|
|
113
115
|
complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_subcommand_from run' -l export-cookie-jar -d 'Exports the cookie jar to a file after completing the run' -r
|
|
114
116
|
complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_subcommand_from run' -l verbose -d 'Show detailed information of collection run and each request sent'
|
|
115
117
|
complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_subcommand_from run' -l mock -d 'Start a mock server from manifest (.json, .yaml or .yml) file' -r
|
|
118
|
+
complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_subcommand_from run' -l port -d 'Port for the --mock server; pass "auto" for an OS-assigned ephemeral port (default: configured port, falls back to an ephemeral one if busy). Only valid with --mock.' -x
|
|
116
119
|
complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_subcommand_from run' -l simulate -d 'Start mock servers with fault-injection scenarios from a .sim.yaml file' -r
|
|
117
120
|
complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_subcommand_from run' -l report-events -d 'Send run results and analytics to Postman'
|
|
118
121
|
complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_subcommand_from run' -s h -l help -d 'display help for command'
|
|
@@ -129,6 +132,24 @@ complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_
|
|
|
129
132
|
complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_subcommand_from run' -l reporter-html-omitAllHeadersAndBody -d 'Remove all request/response headers and bodies from the report.'
|
|
130
133
|
complete -c postman -n '__fish_seen_subcommand_from collection; and __fish_seen_subcommand_from run' -r -k -a '(__fish_complete_suffix .json)'
|
|
131
134
|
|
|
135
|
+
# ---------- environment ----------
|
|
136
|
+
complete -c postman -n '__postman_using_subcommand environment lint' -a lint -d 'Run linting on a local Postman environment at the given file or directory path.'
|
|
137
|
+
complete -c postman -n '__fish_seen_subcommand_from environment' -s h -l help -d 'display help for command'
|
|
138
|
+
# ---------- environment lint ----------
|
|
139
|
+
complete -c postman -n '__fish_seen_subcommand_from environment; and __fish_seen_subcommand_from lint' -s f -l fail-severity -d 'Exit with failure if diagnostics at this level or above are present. [choices: "error", "warning"] (default: "error")' -x
|
|
140
|
+
complete -c postman -n '__fish_seen_subcommand_from environment; and __fish_seen_subcommand_from lint' -s o -l output -d 'Output format: cli (human-readable), table, json, or csv. (default: "cli")' -x
|
|
141
|
+
complete -c postman -n '__fish_seen_subcommand_from environment; and __fish_seen_subcommand_from lint' -s h -l help -d 'display help for command'
|
|
142
|
+
complete -c postman -n '__fish_seen_subcommand_from environment; and __fish_seen_subcommand_from lint' -r -k -a '(__fish_complete_suffix .json)'
|
|
143
|
+
|
|
144
|
+
# ---------- globals ----------
|
|
145
|
+
complete -c postman -n '__postman_using_subcommand globals lint' -a lint -d 'Run linting on a local Postman globals file at the given file or directory path.'
|
|
146
|
+
complete -c postman -n '__fish_seen_subcommand_from globals' -s h -l help -d 'display help for command'
|
|
147
|
+
# ---------- globals lint ----------
|
|
148
|
+
complete -c postman -n '__fish_seen_subcommand_from globals; and __fish_seen_subcommand_from lint' -s f -l fail-severity -d 'Exit with failure if diagnostics at this level or above are present. [choices: "error", "warning"] (default: "error")' -x
|
|
149
|
+
complete -c postman -n '__fish_seen_subcommand_from globals; and __fish_seen_subcommand_from lint' -s o -l output -d 'Output format: cli (human-readable), table, json, or csv. (default: "cli")' -x
|
|
150
|
+
complete -c postman -n '__fish_seen_subcommand_from globals; and __fish_seen_subcommand_from lint' -s h -l help -d 'display help for command'
|
|
151
|
+
complete -c postman -n '__fish_seen_subcommand_from globals; and __fish_seen_subcommand_from lint' -r -k -a '(__fish_complete_suffix .json)'
|
|
152
|
+
|
|
132
153
|
# ---------- api ----------
|
|
133
154
|
complete -c postman -n '__postman_using_subcommand api lint publish' -a lint -d 'Run linting on the schema of the given API ID or local file in the given path. If [api] is not provided we will run the linting on the schema present in the .postman config file'
|
|
134
155
|
complete -c postman -n '__postman_using_subcommand api lint publish' -a publish -d 'Publish a version of an API for the given apiId. All entities added to the API will be published by default. User can choose which entities to publish by using additional options.'
|
|
@@ -367,7 +388,7 @@ complete -c postman -n '__fish_seen_subcommand_from sdk' -s h -l help -d 'displa
|
|
|
367
388
|
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from init' -s y -l yes -d 'Skip prompts and overwrite existing sdk config'
|
|
368
389
|
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from init' -s h -l help -d 'display help for command'
|
|
369
390
|
# ---------- sdk generate ----------
|
|
370
|
-
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from generate' -s l -l language -d 'Target language(s) for SDK generation. Specify one or more languages. [choices: "typescript", "python", "java", "go", "csharp", "php", "ruby", "cli", "kotlin", "rust"]' -x
|
|
391
|
+
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from generate' -s l -l language -d 'Target language(s) for SDK generation. Specify one or more languages. [choices: "typescript", "python", "java", "go", "csharp", "php", "ruby", "cli", "kotlin", "rust", "swift"]' -x
|
|
371
392
|
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from generate' -l all -d 'Generate SDKs for all supported languages'
|
|
372
393
|
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from generate' -s o -l output-dir -d 'Directory where the generated SDK will be saved (default: "./sdks")' -x
|
|
373
394
|
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from generate' -l name -d 'Name for the generated SDK package' -x
|
|
@@ -383,7 +404,7 @@ complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcomm
|
|
|
383
404
|
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from generate' -l no-emit -d 'Skip downloading and saving SDK artifacts to disk. Useful in CI when the build only needs to trigger server-side pull requests.'
|
|
384
405
|
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from generate' -s h -l help -d 'display help for command'
|
|
385
406
|
# ---------- sdk track ----------
|
|
386
|
-
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from track' -s l -l language -d 'Language(s) to track. [choices: "typescript", "python", "java", "go", "csharp", "php", "ruby", "cli", "kotlin", "rust"]' -x
|
|
407
|
+
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from track' -s l -l language -d 'Language(s) to track. [choices: "typescript", "python", "java", "go", "csharp", "php", "ruby", "cli", "kotlin", "rust", "swift"]' -x
|
|
387
408
|
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from track' -s o -l output-dir -d 'Base directory containing generated SDKs (default: "./sdks")' -x
|
|
388
409
|
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from track' -s h -l help -d 'display help for command'
|
|
389
410
|
# ---------- sdk list ----------
|
|
@@ -399,7 +420,7 @@ complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcomm
|
|
|
399
420
|
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from fetch' -l log-level -d 'Set build log detail level. "warn" (default) shows errors/warnings inline and collapses info notes; "info" expands all log entries (default: "warn")' -x
|
|
400
421
|
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from fetch' -s h -l help -d 'display help for command'
|
|
401
422
|
# ---------- sdk connect ----------
|
|
402
|
-
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from connect' -s l -l language -d 'SDK language (required) [choices: typescript, python, java, go, csharp, php, ruby, cli, kotlin, rust]' -x
|
|
423
|
+
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from connect' -s l -l language -d 'SDK language (required) [choices: typescript, python, java, go, csharp, php, ruby, cli, kotlin, rust, swift]' -x
|
|
403
424
|
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from connect' -s r -l repo -d 'GitHub repository in <owner>/<name> form (alternative to --repo-owner + --repo-name)' -x
|
|
404
425
|
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from connect' -l repo-owner -d 'GitHub repository owner (user or org)' -x
|
|
405
426
|
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from connect' -l repo-name -d 'GitHub repository name' -x
|
|
@@ -426,11 +447,21 @@ complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcomm
|
|
|
426
447
|
complete -c postman -n '__fish_seen_subcommand_from sdk; and __fish_seen_subcommand_from connections; and __fish_seen_subcommand_from delete' -s h -l help -d 'display help for command'
|
|
427
448
|
|
|
428
449
|
# ---------- mock ----------
|
|
429
|
-
complete -c postman -n '__postman_using_subcommand mock run' -a
|
|
450
|
+
complete -c postman -n '__postman_using_subcommand mock generate run' -a generate -d 'Generate a local, runnable mock from a Postman collection (v2.0/v2.1/v3 file, or a git-native v3 collection directory) or an OpenAPI 3.0/3.1 spec file. The source type is auto-detected.'
|
|
451
|
+
complete -c postman -n '__postman_using_subcommand mock generate run' -a run -d 'Start a local mock server given a manifest file (JSON or YAML).'
|
|
430
452
|
complete -c postman -n '__fish_seen_subcommand_from mock' -s h -l help -d 'display help for command'
|
|
453
|
+
# ---------- mock generate ----------
|
|
454
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s o -l output -d 'Output directory for the mock (default: postman/mocks/<slug>)' -r
|
|
455
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l name -d 'Display name for the generated mock' -x
|
|
456
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l port -d 'Port the mock server should listen on (default: 4500)' -x
|
|
457
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l force -d 'Overwrite the config.yaml/default.js in the output directory if it already exists'
|
|
458
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s u -l update -d 'Update an existing mock in place from the source: path to its config.yaml (or the directory containing it). Regenerates the default scenario handler and preserves the existing name/port/scenarios. Cannot be combined with --output.' -r
|
|
459
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s x -l suppress-exit-code -d 'Always exit with code 0, even on failure'
|
|
460
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s h -l help -d 'display help for command'
|
|
431
461
|
# ---------- mock run ----------
|
|
432
462
|
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from run' -s e -l environment -d 'Path to an environment file (JSON or YAML) for pm.environment' -r
|
|
433
463
|
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from run' -s g -l globals -d 'Path to a globals file (JSON or YAML) for pm.globals' -r
|
|
464
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from run' -s p -l port -d 'Mock server port, or "auto" for an ephemeral one (default: configured port, falls back to an ephemeral one if busy).' -x
|
|
434
465
|
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from run' -s h -l help -d 'display help for command'
|
|
435
466
|
|
|
436
467
|
# ---------- application ----------
|
package/completions/zsh/_postman
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#compdef postman
|
|
2
2
|
compdef _postman postman
|
|
3
|
-
# Zsh completion for Postman CLI (postman v1.
|
|
3
|
+
# Zsh completion for Postman CLI (postman v1.47.2)
|
|
4
4
|
# Auto-generated by scripts/generate.mjs — DO NOT EDIT
|
|
5
5
|
# Source: spec/commands.json
|
|
6
6
|
# https://github.com/yokawasa/postman-cli-completion
|
|
@@ -23,6 +23,8 @@ _postman() {
|
|
|
23
23
|
login) _postman_login ;;
|
|
24
24
|
logout) _postman_logout ;;
|
|
25
25
|
collection) _postman_collection ;;
|
|
26
|
+
environment) _postman_environment ;;
|
|
27
|
+
globals) _postman_globals ;;
|
|
26
28
|
api) _postman_api ;;
|
|
27
29
|
runner) _postman_runner ;;
|
|
28
30
|
spec) _postman_spec ;;
|
|
@@ -50,6 +52,8 @@ _postman_commands() {
|
|
|
50
52
|
'login:Authenticate with Postman to access your resources.'
|
|
51
53
|
'logout:Delete the stored Postman API key.'
|
|
52
54
|
'collection:Run and test your Postman collections directly from the command line.'
|
|
55
|
+
'environment:Work with local Postman environments from the command line.'
|
|
56
|
+
'globals:Work with local Postman globals from the command line.'
|
|
53
57
|
'api:Publish and test your APIs directly from the command line'
|
|
54
58
|
'runner:Run runners on your own environments for monitoring your APIs'
|
|
55
59
|
'spec:Lint and validate Specifications from the command line'
|
|
@@ -180,6 +184,7 @@ _postman_collection_run() {
|
|
|
180
184
|
'--export-cookie-jar[Exports the cookie jar to a file after completing the run]:path:_files -g "*.json"' \
|
|
181
185
|
'--verbose[Show detailed information of collection run and each request sent]' \
|
|
182
186
|
'--mock[Start a mock server from manifest (.json, .yaml or .yml) file]:path:_files -g "*.json"' \
|
|
187
|
+
'--port[Port for the --mock server; pass "auto" for an OS-assigned ephemeral port (default\: configured port, falls back to an ephemeral one if busy). Only valid with --mock.]:port' \
|
|
183
188
|
'--simulate[Start mock servers with fault-injection scenarios from a .sim.yaml file]:path:_files -g "*.(sim.yaml|yaml|yml)"' \
|
|
184
189
|
'--report-events[Send run results and analytics to Postman]' \
|
|
185
190
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
@@ -197,6 +202,70 @@ _postman_collection_run() {
|
|
|
197
202
|
'*:collectionId/Path:_files -g "*.json"'
|
|
198
203
|
}
|
|
199
204
|
|
|
205
|
+
_postman_environment() {
|
|
206
|
+
local context state state_descr line
|
|
207
|
+
typeset -A opt_args
|
|
208
|
+
_arguments -C \
|
|
209
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
210
|
+
'1: :_postman_environment_commands' \
|
|
211
|
+
'*::arg:->args'
|
|
212
|
+
case $state in
|
|
213
|
+
args)
|
|
214
|
+
case $words[1] in
|
|
215
|
+
lint) _postman_environment_lint ;;
|
|
216
|
+
esac
|
|
217
|
+
;;
|
|
218
|
+
esac
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
_postman_environment_commands() {
|
|
222
|
+
local -a sub
|
|
223
|
+
sub=(
|
|
224
|
+
'lint:Run linting on a local Postman environment at the given file or directory path.'
|
|
225
|
+
)
|
|
226
|
+
_describe -t commands 'environment command' sub
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
_postman_environment_lint() {
|
|
230
|
+
_arguments \
|
|
231
|
+
'(-f --fail-severity)'{-f,--fail-severity}'[Exit with failure if diagnostics at this level or above are present. \[choices\: "error", "warning"\] (default\: "error")]:value' \
|
|
232
|
+
'(-o --output)'{-o,--output}'[Output format\: cli (human-readable), table, json, or csv. (default\: "cli")]:value' \
|
|
233
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
234
|
+
'*:path:_files -g "*.json"'
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
_postman_globals() {
|
|
238
|
+
local context state state_descr line
|
|
239
|
+
typeset -A opt_args
|
|
240
|
+
_arguments -C \
|
|
241
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
242
|
+
'1: :_postman_globals_commands' \
|
|
243
|
+
'*::arg:->args'
|
|
244
|
+
case $state in
|
|
245
|
+
args)
|
|
246
|
+
case $words[1] in
|
|
247
|
+
lint) _postman_globals_lint ;;
|
|
248
|
+
esac
|
|
249
|
+
;;
|
|
250
|
+
esac
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
_postman_globals_commands() {
|
|
254
|
+
local -a sub
|
|
255
|
+
sub=(
|
|
256
|
+
'lint:Run linting on a local Postman globals file at the given file or directory path.'
|
|
257
|
+
)
|
|
258
|
+
_describe -t commands 'globals command' sub
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
_postman_globals_lint() {
|
|
262
|
+
_arguments \
|
|
263
|
+
'(-f --fail-severity)'{-f,--fail-severity}'[Exit with failure if diagnostics at this level or above are present. \[choices\: "error", "warning"\] (default\: "error")]:value' \
|
|
264
|
+
'(-o --output)'{-o,--output}'[Output format\: cli (human-readable), table, json, or csv. (default\: "cli")]:value' \
|
|
265
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
266
|
+
'*:path:_files -g "*.json"'
|
|
267
|
+
}
|
|
268
|
+
|
|
200
269
|
_postman_api() {
|
|
201
270
|
local context state state_descr line
|
|
202
271
|
typeset -A opt_args
|
|
@@ -678,7 +747,7 @@ _postman_sdk_init() {
|
|
|
678
747
|
|
|
679
748
|
_postman_sdk_generate() {
|
|
680
749
|
_arguments \
|
|
681
|
-
'(-l --language)'{-l,--language}'[Target language(s) for SDK generation. Specify one or more languages. \[choices\: "typescript", "python", "java", "go", "csharp", "php", "ruby", "cli", "kotlin", "rust"\]]:languages...' \
|
|
750
|
+
'(-l --language)'{-l,--language}'[Target language(s) for SDK generation. Specify one or more languages. \[choices\: "typescript", "python", "java", "go", "csharp", "php", "ruby", "cli", "kotlin", "rust", "swift"\]]:languages...' \
|
|
682
751
|
'--all[Generate SDKs for all supported languages]' \
|
|
683
752
|
'(-o --output-dir)'{-o,--output-dir}'[Directory where the generated SDK will be saved (default\: "./sdks")]:path:_files -/' \
|
|
684
753
|
'--name[Name for the generated SDK package]:name' \
|
|
@@ -698,7 +767,7 @@ _postman_sdk_generate() {
|
|
|
698
767
|
|
|
699
768
|
_postman_sdk_track() {
|
|
700
769
|
_arguments \
|
|
701
|
-
'(-l --language)'{-l,--language}'[Language(s) to track. \[choices\: "typescript", "python", "java", "go", "csharp", "php", "ruby", "cli", "kotlin", "rust"\]]:languages...' \
|
|
770
|
+
'(-l --language)'{-l,--language}'[Language(s) to track. \[choices\: "typescript", "python", "java", "go", "csharp", "php", "ruby", "cli", "kotlin", "rust", "swift"\]]:languages...' \
|
|
702
771
|
'(-o --output-dir)'{-o,--output-dir}'[Base directory containing generated SDKs (default\: "./sdks")]:path:_files -/' \
|
|
703
772
|
'(-h --help)'{-h,--help}'[display help for command]'
|
|
704
773
|
}
|
|
@@ -725,7 +794,7 @@ _postman_sdk_fetch() {
|
|
|
725
794
|
|
|
726
795
|
_postman_sdk_connect() {
|
|
727
796
|
_arguments \
|
|
728
|
-
'(-l --language)'{-l,--language}'[SDK language (required) \[choices\: typescript, python, java, go, csharp, php, ruby, cli, kotlin, rust\]]:language' \
|
|
797
|
+
'(-l --language)'{-l,--language}'[SDK language (required) \[choices\: typescript, python, java, go, csharp, php, ruby, cli, kotlin, rust, swift\]]:language' \
|
|
729
798
|
'(-r --repo)'{-r,--repo}'[GitHub repository in <owner>/<name> form (alternative to --repo-owner + --repo-name)]:owner/name' \
|
|
730
799
|
'--repo-owner[GitHub repository owner (user or org)]:owner' \
|
|
731
800
|
'--repo-name[GitHub repository name]:name' \
|
|
@@ -793,6 +862,7 @@ _postman_mock() {
|
|
|
793
862
|
case $state in
|
|
794
863
|
args)
|
|
795
864
|
case $words[1] in
|
|
865
|
+
generate) _postman_mock_generate ;;
|
|
796
866
|
run) _postman_mock_run ;;
|
|
797
867
|
esac
|
|
798
868
|
;;
|
|
@@ -802,15 +872,29 @@ _postman_mock() {
|
|
|
802
872
|
_postman_mock_commands() {
|
|
803
873
|
local -a sub
|
|
804
874
|
sub=(
|
|
875
|
+
'generate:Generate a local, runnable mock from a Postman collection (v2.0/v2.1/v3 file, or a git-native v3 collection directory) or an OpenAPI 3.0/3.1 spec file. The source type is auto-detected.'
|
|
805
876
|
'run:Start a local mock server given a manifest file (JSON or YAML).'
|
|
806
877
|
)
|
|
807
878
|
_describe -t commands 'mock command' sub
|
|
808
879
|
}
|
|
809
880
|
|
|
881
|
+
_postman_mock_generate() {
|
|
882
|
+
_arguments \
|
|
883
|
+
'(-o --output)'{-o,--output}'[Output directory for the mock (default\: postman/mocks/<slug>)]:dir:_files -g "*.json"' \
|
|
884
|
+
'--name[Display name for the generated mock]:name' \
|
|
885
|
+
'--port[Port the mock server should listen on (default\: 4500)]:port' \
|
|
886
|
+
'--force[Overwrite the config.yaml/default.js in the output directory if it already exists]' \
|
|
887
|
+
'(-u --update)'{-u,--update}'[Update an existing mock in place from the source\: path to its config.yaml (or the directory containing it). Regenerates the default scenario handler and preserves the existing name/port/scenarios. Cannot be combined with --output.]:mockPath:_files -g "*.json"' \
|
|
888
|
+
'(-x --suppress-exit-code)'{-x,--suppress-exit-code}'[Always exit with code 0, even on failure]' \
|
|
889
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
890
|
+
'*:sourcePath:'
|
|
891
|
+
}
|
|
892
|
+
|
|
810
893
|
_postman_mock_run() {
|
|
811
894
|
_arguments \
|
|
812
895
|
'(-e --environment)'{-e,--environment}'[Path to an environment file (JSON or YAML) for pm.environment]:path:_files -g "*.json"' \
|
|
813
896
|
'(-g --globals)'{-g,--globals}'[Path to a globals file (JSON or YAML) for pm.globals]:path:_files -g "*.json"' \
|
|
897
|
+
'(-p --port)'{-p,--port}'[Mock server port, or "auto" for an ephemeral one (default\: configured port, falls back to an ephemeral one if busy).]:port' \
|
|
814
898
|
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
815
899
|
'*:manifestPath:'
|
|
816
900
|
}
|