Update httpie completion

This commit is contained in:
Shohei YOSHIDA 2023-06-22 11:17:10 +09:00
parent 66c4b6fe72
commit 302f477e10
No known key found for this signature in database
GPG Key ID: C9A1BB11BB940CF2
1 changed files with 30 additions and 30 deletions

View File

@ -28,7 +28,7 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for httpie 3.2.1 (https://httpie.io/) # Completion script for httpie 3.2.2 (https://httpie.io/)
# #
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -143,9 +143,9 @@ _httpie_printflags() {
_httpie_styles() { _httpie_styles() {
local -a styles=(abap algol algol_nu arduino auto autumn borland bw local -a styles=(abap algol algol_nu arduino auto autumn borland bw
colorful default dracula emacs friendly colorful default dracula emacs friendly
friendly_grayscale fruity gruvbox-dark gruvbox-light friendly_grayscale fruity github-dark gruvbox-dark gruvbox-light
igor inkpot lilypond lovelace manni material monokai igor inkpot lilypond lovelace manni material monokai
murphy native one-dark paraiso-dark paraiso-light murphy native nord nord-darker one-dark paraiso-dark paraiso-light
pastie perldoc pie pie-dark pie-light rainbow_dash pastie perldoc pie pie-dark pie-light rainbow_dash
rrt sas solarized solarized-dark solarized-light stata rrt sas solarized solarized-dark solarized-light stata
stata-dark stata-light tango trac vim vs xcode zenburn) stata-dark stata-light tango trac vim vs xcode zenburn)
@ -156,57 +156,57 @@ _httpie_styles() {
integer NORMARG integer NORMARG
_arguments -n -C -s \ _arguments -n -C -s \
'(-j --json -f)'{-j,--json}'[Data items from the command line are serialized as a JSON object.]' \ '(-j --json -f)'{-j,--json}'[Data items from the command line are serialized as a JSON object]' \
'(-f --form -j)'{-f,--form}'[Data items from the command line are serialized as form fields.]' \ '(-f --form -j)'{-f,--form}'[Data items from the command line are serialized as form fields]' \
'--multipart[Similar to --form, but always sends a multipart/form-data request]' \ '--multipart[Similar to --form, but always sends a multipart/form-data request]' \
'--boundary=[Specify a custom boundary string for multipart/form-data requests]' \ '--boundary=[Specify a custom boundary string for multipart/form-data requests]' \
'--raw=[This option allows you to pass raw request data without extra processing]' \ '--raw=[This option allows you to pass raw request data without extra processing]' \
'(-x --compress)'{-x,--compress}'[Content compressed with Deflate algorithm]' \ '(-x --compress)'{-x,--compress}'[Content compressed with Deflate algorithm]' \
'--pretty=[Controls output processing.]:output format:(all colors format none)' \ '--pretty=[Controls output processing]:output format:(all colors format none)' \
'(-s --style)'{-s,--style}'=[Output coloring style]:STYLE:_httpie_styles' \ '(-s --style)'{-s,--style}'=[Output coloring style]:STYLE:_httpie_styles' \
'--unsorted[Disables all sorting while formatting output]' \ '--unsorted[Disables all sorting while formatting output]' \
'--sorted[Re-enables all sorting options while formatting output]' \ '--sorted[Re-enables all sorting options while formatting output]' \
'--response-charset=[Override the response encoding for terminal display purposes]' \ '--response-charset=[Override the response encoding for terminal display purposes]:encoding' \
'--response-mime=[Override the response mime type for coloring and formatting for the terminal]' \ '--response-mime=[Override the response mime type for coloring and formatting for the terminal]:mine' \
'--format-options=[Controls output formatting]' \ '--format-options=[Controls output formatting]:format' \
'(-p --print)'{-p,--print}'=[String specifying what the output should contain]:print flags:_httpie_printflags' \ '(-p --print)'{-p,--print}'=[String specifying what the output should contain]:print flags:_httpie_printflags' \
'(-v --verbose)'{-v,--verbose}'[Print the whole request as well as the response.]' \ '(-v --verbose)'{-v,--verbose}'[Print the whole request as well as the response]' \
'(-p -h --headers)'{-h,--headers}'[Print only the response headers.]' \ '(-p -h --headers)'{-h,--headers}'[Print only the response headers]' \
'(-p -m --meta)'{-m,--meta}'[Print only the response metadata]' \ '(-p -m --meta)'{-m,--meta}'[Print only the response metadata]' \
'(-p -b --body)'{-b,--body}'[Print only the response body.]' \ '(-p -b --body)'{-b,--body}'[Print only the response body]' \
'--all[By default, only the final request/response is shown]' \ '--all[By default, only the final request/response is shown]' \
'(-S --stream)'{-S,--stream}'[Always stream the output by line, i.e., behave like `tail -f`.]' \ '(-S --stream)'{-S,--stream}'[Always stream the output by line, i.e., behave like `tail -f`]' \
'(-o --output)'{-o,--output}'=[Save output to FILE.]:output file:_files' \ '(-o --output)'{-o,--output}'=[Save output to FILE]:output file:_files' \
'(-d --download)'{-d,--download}'=[Do not print the response body to stdout.]' \ '(-d --download)'{-d,--download}'=[Do not print the response body to stdout]' \
'(-c --continue)'{-c,--continue}'[Resume an interrupted download.]' \ '(-c --continue)'{-c,--continue}'[Resume an interrupted download]' \
'(-q --quiet)'{-q,--quiet}'[Do not print to stdout or stderr, except for errors and warnings when provided once]' \ '(-q --quiet)'{-q,--quiet}'[Do not print to stdout or stderr, except for errors and warnings when provided once]' \
'(--session-read-only)--session=[Create, or reuse and update a session.]:session name (or path)' \ '(--session-read-only)--session=[Create, or reuse and update a session]:session name (or path)' \
'(--session)--session-read-only=[Create or read a session without updating it form the request/response exchange.]:session name (or path)' \ '(--session)--session-read-only=[Create or read a session without updating it form the request/response exchange]:session name (or path)' \
'(-a --auth)'{-a,--auth}'=[If only the username is provided (-a username)]:USER\:PASS' \ '(-a --auth)'{-a,--auth}'=[If only the username is provided (-a username)]:USER\:PASS' \
'--auth-type=[The authentication mechanism to be used. Defaults to "basic".]:AUTH-TYPE:(basic digest bearer)' \ '--auth-type=[The authentication mechanism to be used. Defaults to "basic"]:AUTH-TYPE:(basic digest bearer)' \
'--ignore-netrc[Ignore credentials from .netrc]' \ '--ignore-netrc[Ignore credentials from .netrc]' \
'--offline[Build the request and print it but do not actually send it]' \ '--offline[Build the request and print it but do not actually send it]' \
'--proxy=[String mapping protocol to the URL of the proxy.]:PROXY' \ '--proxy=[String mapping protocol to the URL of the proxy]:PROXY' \
'(-F --follow)'{-F,--follow}'[Allow full redirects.]' \ '(-F --follow)'{-F,--follow}'[Allow full redirects]' \
'--max-redirects=[A limit of redirects]:number:' \ '--max-redirects=[A limit of redirects]:number:' \
'--max-headers=[The maximum number of response headers to be read]:number:' \ '--max-headers=[The maximum number of response headers to be read]:number:' \
"--verify=[Enable or disable verification of ssl certificates.]:verify certificate:(yes no)" \ "--verify=[Enable or disable verification of ssl certificates]:verify certificate:(yes no)" \
'--ssl=[The desired protocol version to use]:ssl version:(ssl2.3 tls1 tls1.1 tls1.2)' \ '--ssl=[The desired protocol version to use]:ssl version:(ssl2.3 tls1 tls1.1 tls1.2)' \
'--ciphers=[A string in the OpenSSL cipher list format]' \ '--ciphers=[A string in the OpenSSL cipher list format]:ciphers' \
'--cert=[Specify a local cert to use as client side SSL certificate]:cert:_files' \ '--cert=[Specify a local cert to use as client side SSL certificate]:cert:_files' \
'--cert-key=[Specify the private to key to use with SSL]:cert key:_files' \ '--cert-key=[Specify the private to key to use with SSL]:cert key:_files' \
'--cert-key-pass=[The passphrase to be used to with the given private key]' \ '--cert-key-pass=[The passphrase to be used to with the given private key]' \
'--timeout=[Float describes the timeout of the request (Use socket.setdefaulttimeout() as fallback).]:timeout (seconds)' \ '--timeout=[Float describes the timeout of the request (Use socket.setdefaulttimeout() as fallback)]:timeout (seconds)' \
'--check-status[This flag instructs HTTPie to also check the HTTP status code and exit with an error if the status indicates one.]' \ '--check-status[This flag instructs HTTPie to also check the HTTP status code and exit with an error if the status indicates one]' \
'--path-as-is[Bypass dot segment URL squashing]' \ '--path-as-is[Bypass dot segment URL squashing]' \
'--chunked[Enable streaming via chunked transfer encoding]' \ '--chunked[Enable streaming via chunked transfer encoding]' \
'(-I --ignore-stdin)'{-I,--ignore-stdin}'[Do not attempt to read stdin.]' \ '(-I --ignore-stdin)'{-I,--ignore-stdin}'[Do not attempt to read stdin]' \
'(- *)--help[show help message.]' \ '(- *)--help[show help message]' \
'(- *)--manual[show the full manual]' \ '(- *)--manual[show the full manual]' \
"(- *)--version[show program's version number and exit.]" \ "(- *)--version[show program's version number and exit]" \
'--traceback[Prints exception traceback should one occur.]' \ '--traceback[Prints exception traceback should one occur]' \
'--default-scheme=[The default scheme to use if not specified in the URL]:scheme:' \ '--default-scheme=[The default scheme to use if not specified in the URL]:scheme:' \
'--debug[Prints exception traceback should one occur and other information useful for debugging HTTPie itself.]' \ '--debug[Prints exception traceback should one occur and other information useful for debugging HTTPie itself]' \
'*:args:_httpie_params' && return 0 '*:args:_httpie_params' && return 0
# Local Variables: # Local Variables: