From f956ab26b254ca0da5a85fca2fd251bafe7e5f79 Mon Sep 17 00:00:00 2001 From: Jefferson Julio Date: Tue, 17 May 2022 13:58:48 -0300 Subject: Create exclusion groups for ZSH completion options. --- completions/zsh/_rest-run | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'completions/zsh') 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 { -- cgit v1.2.3