aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJefferson Julio <[email protected]>2022-05-17 13:58:48 -0300
committerJefferson Julio <[email protected]>2022-05-17 13:58:48 -0300
commitf956ab26b254ca0da5a85fca2fd251bafe7e5f79 (patch)
treeec5626f308765b44350752879167cc2094595790
parent4204a8f4a0c0f9d0f37d83127eb3bab7ef6a3b24 (diff)
downloadrest-run-master.tar.bz2
rest-run-master.zip
Create exclusion groups for ZSH completion options.HEADmaster
-rw-r--r--completions/zsh/_rest-run30
1 files changed, 14 insertions, 16 deletions
diff --git a/completions/zsh/_rest-run b/completions/zsh/_rest-run
index c9a642b..0ed79ff 100644
--- a/completions/zsh/_rest-run
+++ b/completions/zsh/_rest-run
@@ -18,23 +18,21 @@ function _rest-run_read_domain () {
function _rest-run {
local line
- local -a args
-
- args+=(
- '1:*:(POST GET PUT PATCH DELETE)'
- '2:*:_rest-run_url_opts'
- '-ne[Skip request body edit]'
- '-b[Body options]: :_rest-run_body_opts'
- '-r[Response options]: :_rest-run_response_opts'
- '-e[Extract request data]: :_rest-run_extract_opts'
- '-rr[Read response file]: :_rest-run_select_response_opts'
- '*-h[HTTP header]'
- '-p[Paginate request response]'
- '--no-color[Disable ANSI color scape codes (default when output is being piped)]'
- '--color[Enable ANSI color scape codes]'
- )
- _arguments -C $args
+ _arguments -C \
+ '1:*:(POST GET PUT PATCH DELETE)' \
+ '2:*:_rest-run_url_opts' \
+ '*-h[HTTP header]' \
+ + '(editopts)' {-ne,--no-edit}'[Skip request body edit]' \
+ + '(paginateopts)' {-p,--paginate}'[Paginate request response]' \
+ + '(coloropts)' \
+ '--no-color[Disable ANSI color scape codes (default when output is being piped)]' \
+ '--color[Enable ANSI color scape codes]' \
+ + '(extractopts)' {-e,--extract}'[Extract request data]: :_rest-run_extract_opts' \
+ + '(bodyresponseopts)' \
+ {-b,--body}'[Body options]: :_rest-run_body_opts' \
+ {-r,--response}'[Response options]: :_rest-run_response_opts' \
+ {-rr,--read-response}'[Read response file]: :_rest-run_select_response_opts'
}
function _rest-run_url_opts {