From 0fb0a13ecb64a3a1af35cfaf13a6970f78c38dfb Mon Sep 17 00:00:00 2001 From: Mohamed Daahir Date: Sat, 12 Oct 2024 22:22:45 +0100 Subject: [PATCH] bump version to v0.23.0 --- CHANGELOG.md | 2 +- Cargo.lock | 2 +- Cargo.toml | 2 +- completions/_xh | 2 +- completions/_xh.ps1 | 244 ++++++++++++++++++++++---------------------- completions/xh.fish | 10 +- doc/xh.1 | 4 +- 7 files changed, 134 insertions(+), 132 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36bd1af7..8afc5ebb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## Unreleased +## [0.23.0] - 2024-10-12 ### Features - Handle responses compressed in zstd format, see #364 (@zuisong) - Suppress warnings when `-qq` flag is used, see #371 (@blyxxyz) diff --git a/Cargo.lock b/Cargo.lock index 1ea5f396..c67b0bfa 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2505,7 +2505,7 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "xh" -version = "0.22.2" +version = "0.23.0" dependencies = [ "anyhow", "assert_cmd", diff --git a/Cargo.toml b/Cargo.toml index a32552bb..05bfafab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xh" -version = "0.22.2" +version = "0.23.0" authors = ["ducaale "] edition = "2021" rust-version = "1.74.0" diff --git a/completions/_xh b/completions/_xh index 6192a86e..c48c5897 100644 --- a/completions/_xh +++ b/completions/_xh @@ -14,7 +14,7 @@ _xh() { fi local context curcontext="$curcontext" state line - _arguments "${_arguments_options[@]}" \ + _arguments "${_arguments_options[@]}" : \ '--raw=[Pass raw request data without extra processing]:RAW: ' \ '--pretty=[Controls output processing]:STYLE:((all\:"(default) Enable both coloring and formatting" colors\:"Apply syntax highlighting to output" diff --git a/completions/_xh.ps1 b/completions/_xh.ps1 index 791d4912..6172f0ed 100644 --- a/completions/_xh.ps1 +++ b/completions/_xh.ps1 @@ -21,128 +21,128 @@ Register-ArgumentCompleter -Native -CommandName 'xh' -ScriptBlock { $completions = @(switch ($command) { 'xh' { - [CompletionResult]::new('--raw', 'raw', [CompletionResultType]::ParameterName, 'Pass raw request data without extra processing') - [CompletionResult]::new('--pretty', 'pretty', [CompletionResultType]::ParameterName, 'Controls output processing') - [CompletionResult]::new('--format-options', 'format-options', [CompletionResultType]::ParameterName, 'Set output formatting options') - [CompletionResult]::new('-s', 's', [CompletionResultType]::ParameterName, 'Output coloring style') - [CompletionResult]::new('--style', 'style', [CompletionResultType]::ParameterName, 'Output coloring style') - [CompletionResult]::new('--response-charset', 'response-charset', [CompletionResultType]::ParameterName, 'Override the response encoding for terminal display purposes') - [CompletionResult]::new('--response-mime', 'response-mime', [CompletionResultType]::ParameterName, 'Override the response mime type for coloring and formatting for the terminal') - [CompletionResult]::new('-p', 'p', [CompletionResultType]::ParameterName, 'String specifying what the output should contain') - [CompletionResult]::new('--print', 'print', [CompletionResultType]::ParameterName, 'String specifying what the output should contain') - [CompletionResult]::new('-P', 'P ', [CompletionResultType]::ParameterName, 'The same as --print but applies only to intermediary requests/responses') - [CompletionResult]::new('--history-print', 'history-print', [CompletionResultType]::ParameterName, 'The same as --print but applies only to intermediary requests/responses') - [CompletionResult]::new('-o', 'o', [CompletionResultType]::ParameterName, 'Save output to FILE instead of stdout') - [CompletionResult]::new('--output', 'output', [CompletionResultType]::ParameterName, 'Save output to FILE instead of stdout') - [CompletionResult]::new('--session', 'session', [CompletionResultType]::ParameterName, 'Create, or reuse and update a session') - [CompletionResult]::new('--session-read-only', 'session-read-only', [CompletionResultType]::ParameterName, 'Create or read a session without updating it form the request/response exchange') - [CompletionResult]::new('-A', 'A ', [CompletionResultType]::ParameterName, 'Specify the auth mechanism') - [CompletionResult]::new('--auth-type', 'auth-type', [CompletionResultType]::ParameterName, 'Specify the auth mechanism') - [CompletionResult]::new('-a', 'a', [CompletionResultType]::ParameterName, 'Authenticate as USER with PASS (-A basic|digest) or with TOKEN (-A bearer)') - [CompletionResult]::new('--auth', 'auth', [CompletionResultType]::ParameterName, 'Authenticate as USER with PASS (-A basic|digest) or with TOKEN (-A bearer)') - [CompletionResult]::new('--bearer', 'bearer', [CompletionResultType]::ParameterName, 'Authenticate with a bearer token') - [CompletionResult]::new('--max-redirects', 'max-redirects', [CompletionResultType]::ParameterName, 'Number of redirects to follow. Only respected if --follow is used') - [CompletionResult]::new('--timeout', 'timeout', [CompletionResultType]::ParameterName, 'Connection timeout of the request') - [CompletionResult]::new('--proxy', 'proxy', [CompletionResultType]::ParameterName, 'Use a proxy for a protocol. For example: --proxy https:http://proxy.host:8080') - [CompletionResult]::new('--verify', 'verify', [CompletionResultType]::ParameterName, 'If "no", skip SSL verification. If a file path, use it as a CA bundle') - [CompletionResult]::new('--cert', 'cert', [CompletionResultType]::ParameterName, 'Use a client side certificate for SSL') - [CompletionResult]::new('--cert-key', 'cert-key', [CompletionResultType]::ParameterName, 'A private key file to use with --cert') - [CompletionResult]::new('--ssl', 'ssl', [CompletionResultType]::ParameterName, 'Force a particular TLS version') - [CompletionResult]::new('--default-scheme', 'default-scheme', [CompletionResultType]::ParameterName, 'The default scheme to use if not specified in the URL') - [CompletionResult]::new('--http-version', 'http-version', [CompletionResultType]::ParameterName, 'HTTP version to use') - [CompletionResult]::new('--resolve', 'resolve', [CompletionResultType]::ParameterName, 'Override DNS resolution for specific domain to a custom IP') - [CompletionResult]::new('--interface', 'interface', [CompletionResultType]::ParameterName, 'Bind to a network interface or local IP address') - [CompletionResult]::new('-j', 'j', [CompletionResultType]::ParameterName, '(default) Serialize data items from the command line as a JSON object') - [CompletionResult]::new('--json', 'json', [CompletionResultType]::ParameterName, '(default) Serialize data items from the command line as a JSON object') - [CompletionResult]::new('-f', 'f', [CompletionResultType]::ParameterName, 'Serialize data items from the command line as form fields') - [CompletionResult]::new('--form', 'form', [CompletionResultType]::ParameterName, 'Serialize data items from the command line as form fields') - [CompletionResult]::new('--multipart', 'multipart', [CompletionResultType]::ParameterName, 'Like --form, but force a multipart/form-data request even without files') - [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print only the response headers. Shortcut for --print=h') - [CompletionResult]::new('--headers', 'headers', [CompletionResultType]::ParameterName, 'Print only the response headers. Shortcut for --print=h') - [CompletionResult]::new('-b', 'b', [CompletionResultType]::ParameterName, 'Print only the response body. Shortcut for --print=b') - [CompletionResult]::new('--body', 'body', [CompletionResultType]::ParameterName, 'Print only the response body. Shortcut for --print=b') - [CompletionResult]::new('-m', 'm', [CompletionResultType]::ParameterName, 'Print only the response metadata. Shortcut for --print=m') - [CompletionResult]::new('--meta', 'meta', [CompletionResultType]::ParameterName, 'Print only the response metadata. Shortcut for --print=m') - [CompletionResult]::new('-v', 'v', [CompletionResultType]::ParameterName, 'Print the whole request as well as the response') - [CompletionResult]::new('--verbose', 'verbose', [CompletionResultType]::ParameterName, 'Print the whole request as well as the response') - [CompletionResult]::new('--debug', 'debug', [CompletionResultType]::ParameterName, 'Print full error stack traces and debug log messages') - [CompletionResult]::new('--all', 'all', [CompletionResultType]::ParameterName, 'Show any intermediary requests/responses while following redirects with --follow') - [CompletionResult]::new('-q', 'q', [CompletionResultType]::ParameterName, 'Do not print to stdout or stderr') - [CompletionResult]::new('--quiet', 'quiet', [CompletionResultType]::ParameterName, 'Do not print to stdout or stderr') - [CompletionResult]::new('-S', 'S ', [CompletionResultType]::ParameterName, 'Always stream the response body') - [CompletionResult]::new('--stream', 'stream', [CompletionResultType]::ParameterName, 'Always stream the response body') - [CompletionResult]::new('-d', 'd', [CompletionResultType]::ParameterName, 'Download the body to a file instead of printing it') - [CompletionResult]::new('--download', 'download', [CompletionResultType]::ParameterName, 'Download the body to a file instead of printing it') - [CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'Resume an interrupted download. Requires --download and --output') - [CompletionResult]::new('--continue', 'continue', [CompletionResultType]::ParameterName, 'Resume an interrupted download. Requires --download and --output') - [CompletionResult]::new('--ignore-netrc', 'ignore-netrc', [CompletionResultType]::ParameterName, 'Do not use credentials from .netrc') - [CompletionResult]::new('--offline', 'offline', [CompletionResultType]::ParameterName, 'Construct HTTP requests without sending them anywhere') - [CompletionResult]::new('--check-status', 'check-status', [CompletionResultType]::ParameterName, '(default) Exit with an error status code if the server replies with an error') - [CompletionResult]::new('-F', 'F ', [CompletionResultType]::ParameterName, 'Do follow redirects') - [CompletionResult]::new('--follow', 'follow', [CompletionResultType]::ParameterName, 'Do follow redirects') - [CompletionResult]::new('--native-tls', 'native-tls', [CompletionResultType]::ParameterName, 'Use the system TLS library instead of rustls (if enabled at compile time)') - [CompletionResult]::new('--https', 'https', [CompletionResultType]::ParameterName, 'Make HTTPS requests if not specified in the URL') - [CompletionResult]::new('-4', '4', [CompletionResultType]::ParameterName, 'Resolve hostname to ipv4 addresses only') - [CompletionResult]::new('--ipv4', 'ipv4', [CompletionResultType]::ParameterName, 'Resolve hostname to ipv4 addresses only') - [CompletionResult]::new('-6', '6', [CompletionResultType]::ParameterName, 'Resolve hostname to ipv6 addresses only') - [CompletionResult]::new('--ipv6', 'ipv6', [CompletionResultType]::ParameterName, 'Resolve hostname to ipv6 addresses only') - [CompletionResult]::new('-I', 'I ', [CompletionResultType]::ParameterName, 'Do not attempt to read stdin') - [CompletionResult]::new('--ignore-stdin', 'ignore-stdin', [CompletionResultType]::ParameterName, 'Do not attempt to read stdin') - [CompletionResult]::new('--curl', 'curl', [CompletionResultType]::ParameterName, 'Print a translation to a curl command') - [CompletionResult]::new('--curl-long', 'curl-long', [CompletionResultType]::ParameterName, 'Use the long versions of curl''s flags') - [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') - [CompletionResult]::new('--no-json', 'no-json', [CompletionResultType]::ParameterName, 'no-json') - [CompletionResult]::new('--no-form', 'no-form', [CompletionResultType]::ParameterName, 'no-form') - [CompletionResult]::new('--no-multipart', 'no-multipart', [CompletionResultType]::ParameterName, 'no-multipart') - [CompletionResult]::new('--no-raw', 'no-raw', [CompletionResultType]::ParameterName, 'no-raw') - [CompletionResult]::new('--no-pretty', 'no-pretty', [CompletionResultType]::ParameterName, 'no-pretty') - [CompletionResult]::new('--no-format-options', 'no-format-options', [CompletionResultType]::ParameterName, 'no-format-options') - [CompletionResult]::new('--no-style', 'no-style', [CompletionResultType]::ParameterName, 'no-style') - [CompletionResult]::new('--no-response-charset', 'no-response-charset', [CompletionResultType]::ParameterName, 'no-response-charset') - [CompletionResult]::new('--no-response-mime', 'no-response-mime', [CompletionResultType]::ParameterName, 'no-response-mime') - [CompletionResult]::new('--no-print', 'no-print', [CompletionResultType]::ParameterName, 'no-print') - [CompletionResult]::new('--no-headers', 'no-headers', [CompletionResultType]::ParameterName, 'no-headers') - [CompletionResult]::new('--no-body', 'no-body', [CompletionResultType]::ParameterName, 'no-body') - [CompletionResult]::new('--no-meta', 'no-meta', [CompletionResultType]::ParameterName, 'no-meta') - [CompletionResult]::new('--no-verbose', 'no-verbose', [CompletionResultType]::ParameterName, 'no-verbose') - [CompletionResult]::new('--no-debug', 'no-debug', [CompletionResultType]::ParameterName, 'no-debug') - [CompletionResult]::new('--no-all', 'no-all', [CompletionResultType]::ParameterName, 'no-all') - [CompletionResult]::new('--no-history-print', 'no-history-print', [CompletionResultType]::ParameterName, 'no-history-print') - [CompletionResult]::new('--no-quiet', 'no-quiet', [CompletionResultType]::ParameterName, 'no-quiet') - [CompletionResult]::new('--no-stream', 'no-stream', [CompletionResultType]::ParameterName, 'no-stream') - [CompletionResult]::new('--no-output', 'no-output', [CompletionResultType]::ParameterName, 'no-output') - [CompletionResult]::new('--no-download', 'no-download', [CompletionResultType]::ParameterName, 'no-download') - [CompletionResult]::new('--no-continue', 'no-continue', [CompletionResultType]::ParameterName, 'no-continue') - [CompletionResult]::new('--no-session', 'no-session', [CompletionResultType]::ParameterName, 'no-session') - [CompletionResult]::new('--no-session-read-only', 'no-session-read-only', [CompletionResultType]::ParameterName, 'no-session-read-only') - [CompletionResult]::new('--no-auth-type', 'no-auth-type', [CompletionResultType]::ParameterName, 'no-auth-type') - [CompletionResult]::new('--no-auth', 'no-auth', [CompletionResultType]::ParameterName, 'no-auth') - [CompletionResult]::new('--no-bearer', 'no-bearer', [CompletionResultType]::ParameterName, 'no-bearer') - [CompletionResult]::new('--no-ignore-netrc', 'no-ignore-netrc', [CompletionResultType]::ParameterName, 'no-ignore-netrc') - [CompletionResult]::new('--no-offline', 'no-offline', [CompletionResultType]::ParameterName, 'no-offline') - [CompletionResult]::new('--no-check-status', 'no-check-status', [CompletionResultType]::ParameterName, 'no-check-status') - [CompletionResult]::new('--no-follow', 'no-follow', [CompletionResultType]::ParameterName, 'no-follow') - [CompletionResult]::new('--no-max-redirects', 'no-max-redirects', [CompletionResultType]::ParameterName, 'no-max-redirects') - [CompletionResult]::new('--no-timeout', 'no-timeout', [CompletionResultType]::ParameterName, 'no-timeout') - [CompletionResult]::new('--no-proxy', 'no-proxy', [CompletionResultType]::ParameterName, 'no-proxy') - [CompletionResult]::new('--no-verify', 'no-verify', [CompletionResultType]::ParameterName, 'no-verify') - [CompletionResult]::new('--no-cert', 'no-cert', [CompletionResultType]::ParameterName, 'no-cert') - [CompletionResult]::new('--no-cert-key', 'no-cert-key', [CompletionResultType]::ParameterName, 'no-cert-key') - [CompletionResult]::new('--no-ssl', 'no-ssl', [CompletionResultType]::ParameterName, 'no-ssl') - [CompletionResult]::new('--no-native-tls', 'no-native-tls', [CompletionResultType]::ParameterName, 'no-native-tls') - [CompletionResult]::new('--no-default-scheme', 'no-default-scheme', [CompletionResultType]::ParameterName, 'no-default-scheme') - [CompletionResult]::new('--no-https', 'no-https', [CompletionResultType]::ParameterName, 'no-https') - [CompletionResult]::new('--no-http-version', 'no-http-version', [CompletionResultType]::ParameterName, 'no-http-version') - [CompletionResult]::new('--no-resolve', 'no-resolve', [CompletionResultType]::ParameterName, 'no-resolve') - [CompletionResult]::new('--no-interface', 'no-interface', [CompletionResultType]::ParameterName, 'no-interface') - [CompletionResult]::new('--no-ipv4', 'no-ipv4', [CompletionResultType]::ParameterName, 'no-ipv4') - [CompletionResult]::new('--no-ipv6', 'no-ipv6', [CompletionResultType]::ParameterName, 'no-ipv6') - [CompletionResult]::new('--no-ignore-stdin', 'no-ignore-stdin', [CompletionResultType]::ParameterName, 'no-ignore-stdin') - [CompletionResult]::new('--no-curl', 'no-curl', [CompletionResultType]::ParameterName, 'no-curl') - [CompletionResult]::new('--no-curl-long', 'no-curl-long', [CompletionResultType]::ParameterName, 'no-curl-long') - [CompletionResult]::new('--no-help', 'no-help', [CompletionResultType]::ParameterName, 'no-help') - [CompletionResult]::new('-V', 'V ', [CompletionResultType]::ParameterName, 'Print version') - [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Print version') + [CompletionResult]::new('--raw', '--raw', [CompletionResultType]::ParameterName, 'Pass raw request data without extra processing') + [CompletionResult]::new('--pretty', '--pretty', [CompletionResultType]::ParameterName, 'Controls output processing') + [CompletionResult]::new('--format-options', '--format-options', [CompletionResultType]::ParameterName, 'Set output formatting options') + [CompletionResult]::new('-s', '-s', [CompletionResultType]::ParameterName, 'Output coloring style') + [CompletionResult]::new('--style', '--style', [CompletionResultType]::ParameterName, 'Output coloring style') + [CompletionResult]::new('--response-charset', '--response-charset', [CompletionResultType]::ParameterName, 'Override the response encoding for terminal display purposes') + [CompletionResult]::new('--response-mime', '--response-mime', [CompletionResultType]::ParameterName, 'Override the response mime type for coloring and formatting for the terminal') + [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'String specifying what the output should contain') + [CompletionResult]::new('--print', '--print', [CompletionResultType]::ParameterName, 'String specifying what the output should contain') + [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'The same as --print but applies only to intermediary requests/responses') + [CompletionResult]::new('--history-print', '--history-print', [CompletionResultType]::ParameterName, 'The same as --print but applies only to intermediary requests/responses') + [CompletionResult]::new('-o', '-o', [CompletionResultType]::ParameterName, 'Save output to FILE instead of stdout') + [CompletionResult]::new('--output', '--output', [CompletionResultType]::ParameterName, 'Save output to FILE instead of stdout') + [CompletionResult]::new('--session', '--session', [CompletionResultType]::ParameterName, 'Create, or reuse and update a session') + [CompletionResult]::new('--session-read-only', '--session-read-only', [CompletionResultType]::ParameterName, 'Create or read a session without updating it form the request/response exchange') + [CompletionResult]::new('-A', '-A ', [CompletionResultType]::ParameterName, 'Specify the auth mechanism') + [CompletionResult]::new('--auth-type', '--auth-type', [CompletionResultType]::ParameterName, 'Specify the auth mechanism') + [CompletionResult]::new('-a', '-a', [CompletionResultType]::ParameterName, 'Authenticate as USER with PASS (-A basic|digest) or with TOKEN (-A bearer)') + [CompletionResult]::new('--auth', '--auth', [CompletionResultType]::ParameterName, 'Authenticate as USER with PASS (-A basic|digest) or with TOKEN (-A bearer)') + [CompletionResult]::new('--bearer', '--bearer', [CompletionResultType]::ParameterName, 'Authenticate with a bearer token') + [CompletionResult]::new('--max-redirects', '--max-redirects', [CompletionResultType]::ParameterName, 'Number of redirects to follow. Only respected if --follow is used') + [CompletionResult]::new('--timeout', '--timeout', [CompletionResultType]::ParameterName, 'Connection timeout of the request') + [CompletionResult]::new('--proxy', '--proxy', [CompletionResultType]::ParameterName, 'Use a proxy for a protocol. For example: --proxy https:http://proxy.host:8080') + [CompletionResult]::new('--verify', '--verify', [CompletionResultType]::ParameterName, 'If "no", skip SSL verification. If a file path, use it as a CA bundle') + [CompletionResult]::new('--cert', '--cert', [CompletionResultType]::ParameterName, 'Use a client side certificate for SSL') + [CompletionResult]::new('--cert-key', '--cert-key', [CompletionResultType]::ParameterName, 'A private key file to use with --cert') + [CompletionResult]::new('--ssl', '--ssl', [CompletionResultType]::ParameterName, 'Force a particular TLS version') + [CompletionResult]::new('--default-scheme', '--default-scheme', [CompletionResultType]::ParameterName, 'The default scheme to use if not specified in the URL') + [CompletionResult]::new('--http-version', '--http-version', [CompletionResultType]::ParameterName, 'HTTP version to use') + [CompletionResult]::new('--resolve', '--resolve', [CompletionResultType]::ParameterName, 'Override DNS resolution for specific domain to a custom IP') + [CompletionResult]::new('--interface', '--interface', [CompletionResultType]::ParameterName, 'Bind to a network interface or local IP address') + [CompletionResult]::new('-j', '-j', [CompletionResultType]::ParameterName, '(default) Serialize data items from the command line as a JSON object') + [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, '(default) Serialize data items from the command line as a JSON object') + [CompletionResult]::new('-f', '-f', [CompletionResultType]::ParameterName, 'Serialize data items from the command line as form fields') + [CompletionResult]::new('--form', '--form', [CompletionResultType]::ParameterName, 'Serialize data items from the command line as form fields') + [CompletionResult]::new('--multipart', '--multipart', [CompletionResultType]::ParameterName, 'Like --form, but force a multipart/form-data request even without files') + [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print only the response headers. Shortcut for --print=h') + [CompletionResult]::new('--headers', '--headers', [CompletionResultType]::ParameterName, 'Print only the response headers. Shortcut for --print=h') + [CompletionResult]::new('-b', '-b', [CompletionResultType]::ParameterName, 'Print only the response body. Shortcut for --print=b') + [CompletionResult]::new('--body', '--body', [CompletionResultType]::ParameterName, 'Print only the response body. Shortcut for --print=b') + [CompletionResult]::new('-m', '-m', [CompletionResultType]::ParameterName, 'Print only the response metadata. Shortcut for --print=m') + [CompletionResult]::new('--meta', '--meta', [CompletionResultType]::ParameterName, 'Print only the response metadata. Shortcut for --print=m') + [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Print the whole request as well as the response') + [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Print the whole request as well as the response') + [CompletionResult]::new('--debug', '--debug', [CompletionResultType]::ParameterName, 'Print full error stack traces and debug log messages') + [CompletionResult]::new('--all', '--all', [CompletionResultType]::ParameterName, 'Show any intermediary requests/responses while following redirects with --follow') + [CompletionResult]::new('-q', '-q', [CompletionResultType]::ParameterName, 'Do not print to stdout or stderr') + [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Do not print to stdout or stderr') + [CompletionResult]::new('-S', '-S ', [CompletionResultType]::ParameterName, 'Always stream the response body') + [CompletionResult]::new('--stream', '--stream', [CompletionResultType]::ParameterName, 'Always stream the response body') + [CompletionResult]::new('-d', '-d', [CompletionResultType]::ParameterName, 'Download the body to a file instead of printing it') + [CompletionResult]::new('--download', '--download', [CompletionResultType]::ParameterName, 'Download the body to a file instead of printing it') + [CompletionResult]::new('-c', '-c', [CompletionResultType]::ParameterName, 'Resume an interrupted download. Requires --download and --output') + [CompletionResult]::new('--continue', '--continue', [CompletionResultType]::ParameterName, 'Resume an interrupted download. Requires --download and --output') + [CompletionResult]::new('--ignore-netrc', '--ignore-netrc', [CompletionResultType]::ParameterName, 'Do not use credentials from .netrc') + [CompletionResult]::new('--offline', '--offline', [CompletionResultType]::ParameterName, 'Construct HTTP requests without sending them anywhere') + [CompletionResult]::new('--check-status', '--check-status', [CompletionResultType]::ParameterName, '(default) Exit with an error status code if the server replies with an error') + [CompletionResult]::new('-F', '-F ', [CompletionResultType]::ParameterName, 'Do follow redirects') + [CompletionResult]::new('--follow', '--follow', [CompletionResultType]::ParameterName, 'Do follow redirects') + [CompletionResult]::new('--native-tls', '--native-tls', [CompletionResultType]::ParameterName, 'Use the system TLS library instead of rustls (if enabled at compile time)') + [CompletionResult]::new('--https', '--https', [CompletionResultType]::ParameterName, 'Make HTTPS requests if not specified in the URL') + [CompletionResult]::new('-4', '-4', [CompletionResultType]::ParameterName, 'Resolve hostname to ipv4 addresses only') + [CompletionResult]::new('--ipv4', '--ipv4', [CompletionResultType]::ParameterName, 'Resolve hostname to ipv4 addresses only') + [CompletionResult]::new('-6', '-6', [CompletionResultType]::ParameterName, 'Resolve hostname to ipv6 addresses only') + [CompletionResult]::new('--ipv6', '--ipv6', [CompletionResultType]::ParameterName, 'Resolve hostname to ipv6 addresses only') + [CompletionResult]::new('-I', '-I ', [CompletionResultType]::ParameterName, 'Do not attempt to read stdin') + [CompletionResult]::new('--ignore-stdin', '--ignore-stdin', [CompletionResultType]::ParameterName, 'Do not attempt to read stdin') + [CompletionResult]::new('--curl', '--curl', [CompletionResultType]::ParameterName, 'Print a translation to a curl command') + [CompletionResult]::new('--curl-long', '--curl-long', [CompletionResultType]::ParameterName, 'Use the long versions of curl''s flags') + [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help') + [CompletionResult]::new('--no-json', '--no-json', [CompletionResultType]::ParameterName, 'no-json') + [CompletionResult]::new('--no-form', '--no-form', [CompletionResultType]::ParameterName, 'no-form') + [CompletionResult]::new('--no-multipart', '--no-multipart', [CompletionResultType]::ParameterName, 'no-multipart') + [CompletionResult]::new('--no-raw', '--no-raw', [CompletionResultType]::ParameterName, 'no-raw') + [CompletionResult]::new('--no-pretty', '--no-pretty', [CompletionResultType]::ParameterName, 'no-pretty') + [CompletionResult]::new('--no-format-options', '--no-format-options', [CompletionResultType]::ParameterName, 'no-format-options') + [CompletionResult]::new('--no-style', '--no-style', [CompletionResultType]::ParameterName, 'no-style') + [CompletionResult]::new('--no-response-charset', '--no-response-charset', [CompletionResultType]::ParameterName, 'no-response-charset') + [CompletionResult]::new('--no-response-mime', '--no-response-mime', [CompletionResultType]::ParameterName, 'no-response-mime') + [CompletionResult]::new('--no-print', '--no-print', [CompletionResultType]::ParameterName, 'no-print') + [CompletionResult]::new('--no-headers', '--no-headers', [CompletionResultType]::ParameterName, 'no-headers') + [CompletionResult]::new('--no-body', '--no-body', [CompletionResultType]::ParameterName, 'no-body') + [CompletionResult]::new('--no-meta', '--no-meta', [CompletionResultType]::ParameterName, 'no-meta') + [CompletionResult]::new('--no-verbose', '--no-verbose', [CompletionResultType]::ParameterName, 'no-verbose') + [CompletionResult]::new('--no-debug', '--no-debug', [CompletionResultType]::ParameterName, 'no-debug') + [CompletionResult]::new('--no-all', '--no-all', [CompletionResultType]::ParameterName, 'no-all') + [CompletionResult]::new('--no-history-print', '--no-history-print', [CompletionResultType]::ParameterName, 'no-history-print') + [CompletionResult]::new('--no-quiet', '--no-quiet', [CompletionResultType]::ParameterName, 'no-quiet') + [CompletionResult]::new('--no-stream', '--no-stream', [CompletionResultType]::ParameterName, 'no-stream') + [CompletionResult]::new('--no-output', '--no-output', [CompletionResultType]::ParameterName, 'no-output') + [CompletionResult]::new('--no-download', '--no-download', [CompletionResultType]::ParameterName, 'no-download') + [CompletionResult]::new('--no-continue', '--no-continue', [CompletionResultType]::ParameterName, 'no-continue') + [CompletionResult]::new('--no-session', '--no-session', [CompletionResultType]::ParameterName, 'no-session') + [CompletionResult]::new('--no-session-read-only', '--no-session-read-only', [CompletionResultType]::ParameterName, 'no-session-read-only') + [CompletionResult]::new('--no-auth-type', '--no-auth-type', [CompletionResultType]::ParameterName, 'no-auth-type') + [CompletionResult]::new('--no-auth', '--no-auth', [CompletionResultType]::ParameterName, 'no-auth') + [CompletionResult]::new('--no-bearer', '--no-bearer', [CompletionResultType]::ParameterName, 'no-bearer') + [CompletionResult]::new('--no-ignore-netrc', '--no-ignore-netrc', [CompletionResultType]::ParameterName, 'no-ignore-netrc') + [CompletionResult]::new('--no-offline', '--no-offline', [CompletionResultType]::ParameterName, 'no-offline') + [CompletionResult]::new('--no-check-status', '--no-check-status', [CompletionResultType]::ParameterName, 'no-check-status') + [CompletionResult]::new('--no-follow', '--no-follow', [CompletionResultType]::ParameterName, 'no-follow') + [CompletionResult]::new('--no-max-redirects', '--no-max-redirects', [CompletionResultType]::ParameterName, 'no-max-redirects') + [CompletionResult]::new('--no-timeout', '--no-timeout', [CompletionResultType]::ParameterName, 'no-timeout') + [CompletionResult]::new('--no-proxy', '--no-proxy', [CompletionResultType]::ParameterName, 'no-proxy') + [CompletionResult]::new('--no-verify', '--no-verify', [CompletionResultType]::ParameterName, 'no-verify') + [CompletionResult]::new('--no-cert', '--no-cert', [CompletionResultType]::ParameterName, 'no-cert') + [CompletionResult]::new('--no-cert-key', '--no-cert-key', [CompletionResultType]::ParameterName, 'no-cert-key') + [CompletionResult]::new('--no-ssl', '--no-ssl', [CompletionResultType]::ParameterName, 'no-ssl') + [CompletionResult]::new('--no-native-tls', '--no-native-tls', [CompletionResultType]::ParameterName, 'no-native-tls') + [CompletionResult]::new('--no-default-scheme', '--no-default-scheme', [CompletionResultType]::ParameterName, 'no-default-scheme') + [CompletionResult]::new('--no-https', '--no-https', [CompletionResultType]::ParameterName, 'no-https') + [CompletionResult]::new('--no-http-version', '--no-http-version', [CompletionResultType]::ParameterName, 'no-http-version') + [CompletionResult]::new('--no-resolve', '--no-resolve', [CompletionResultType]::ParameterName, 'no-resolve') + [CompletionResult]::new('--no-interface', '--no-interface', [CompletionResultType]::ParameterName, 'no-interface') + [CompletionResult]::new('--no-ipv4', '--no-ipv4', [CompletionResultType]::ParameterName, 'no-ipv4') + [CompletionResult]::new('--no-ipv6', '--no-ipv6', [CompletionResultType]::ParameterName, 'no-ipv6') + [CompletionResult]::new('--no-ignore-stdin', '--no-ignore-stdin', [CompletionResultType]::ParameterName, 'no-ignore-stdin') + [CompletionResult]::new('--no-curl', '--no-curl', [CompletionResultType]::ParameterName, 'no-curl') + [CompletionResult]::new('--no-curl-long', '--no-curl-long', [CompletionResultType]::ParameterName, 'no-curl-long') + [CompletionResult]::new('--no-help', '--no-help', [CompletionResultType]::ParameterName, 'no-help') + [CompletionResult]::new('-V', '-V ', [CompletionResultType]::ParameterName, 'Print version') + [CompletionResult]::new('--version', '--version', [CompletionResultType]::ParameterName, 'Print version') break } }) diff --git a/completions/xh.fish b/completions/xh.fish index eb94b626..882b707a 100644 --- a/completions/xh.fish +++ b/completions/xh.fish @@ -1,7 +1,7 @@ complete -c xh -l raw -d 'Pass raw request data without extra processing' -r -complete -c xh -l pretty -d 'Controls output processing' -r -f -a "{all '(default) Enable both coloring and formatting',colors 'Apply syntax highlighting to output',format 'Pretty-print json and sort headers',none 'Disable both coloring and formatting'}" +complete -c xh -l pretty -d 'Controls output processing' -r -f -a "{all\t'(default) Enable both coloring and formatting',colors\t'Apply syntax highlighting to output',format\t'Pretty-print json and sort headers',none\t'Disable both coloring and formatting'}" complete -c xh -l format-options -d 'Set output formatting options' -r -complete -c xh -s s -l style -d 'Output coloring style' -r -f -a "{auto '',solarized '',monokai '',fruity ''}" +complete -c xh -s s -l style -d 'Output coloring style' -r -f -a "{auto\t'',solarized\t'',monokai\t'',fruity\t''}" complete -c xh -l response-charset -d 'Override the response encoding for terminal display purposes' -r complete -c xh -l response-mime -d 'Override the response mime type for coloring and formatting for the terminal' -r complete -c xh -s p -l print -d 'String specifying what the output should contain' -r @@ -9,7 +9,7 @@ complete -c xh -s P -l history-print -d 'The same as --print but applies only to complete -c xh -s o -l output -d 'Save output to FILE instead of stdout' -r -F complete -c xh -l session -d 'Create, or reuse and update a session' -r complete -c xh -l session-read-only -d 'Create or read a session without updating it form the request/response exchange' -r -complete -c xh -s A -l auth-type -d 'Specify the auth mechanism' -r -f -a "{basic '',bearer '',digest ''}" +complete -c xh -s A -l auth-type -d 'Specify the auth mechanism' -r -f -a "{basic\t'',bearer\t'',digest\t''}" complete -c xh -s a -l auth -d 'Authenticate as USER with PASS (-A basic|digest) or with TOKEN (-A bearer)' -r complete -c xh -l bearer -d 'Authenticate with a bearer token' -r complete -c xh -l max-redirects -d 'Number of redirects to follow. Only respected if --follow is used' -r @@ -18,9 +18,9 @@ complete -c xh -l proxy -d 'Use a proxy for a protocol. For example: --proxy htt complete -c xh -l verify -d 'If "no", skip SSL verification. If a file path, use it as a CA bundle' -r complete -c xh -l cert -d 'Use a client side certificate for SSL' -r -F complete -c xh -l cert-key -d 'A private key file to use with --cert' -r -F -complete -c xh -l ssl -d 'Force a particular TLS version' -r -f -a "{auto '',tls1 '',tls1.1 '',tls1.2 '',tls1.3 ''}" +complete -c xh -l ssl -d 'Force a particular TLS version' -r -f -a "{auto\t'',tls1\t'',tls1.1\t'',tls1.2\t'',tls1.3\t''}" complete -c xh -l default-scheme -d 'The default scheme to use if not specified in the URL' -r -complete -c xh -l http-version -d 'HTTP version to use' -r -f -a "{1.0 '',1.1 '',2 '',2-prior-knowledge ''}" +complete -c xh -l http-version -d 'HTTP version to use' -r -f -a "{1.0\t'',1.1\t'',2\t'',2-prior-knowledge\t''}" complete -c xh -l resolve -d 'Override DNS resolution for specific domain to a custom IP' -r complete -c xh -l interface -d 'Bind to a network interface or local IP address' -r complete -c xh -s j -l json -d '(default) Serialize data items from the command line as a JSON object' diff --git a/doc/xh.1 b/doc/xh.1 index 3ef1ef67..0bb1c8cb 100644 --- a/doc/xh.1 +++ b/doc/xh.1 @@ -1,4 +1,4 @@ -.TH XH 1 2024-07-08 0.22.2 "User Commands" +.TH XH 1 2024-10-12 0.23.0 "User Commands" .SH NAME xh \- Friendly and fast tool for sending HTTP requests @@ -182,6 +182,8 @@ The same as \-\-print but applies only to intermediary requests/responses. .TP 4 \fB\-q\fR, \fB\-\-quiet\fR Do not print to stdout or stderr. + +Using quiet twice i.e. \-qq will suppress warnings as well. .TP 4 \fB\-S\fR, \fB\-\-stream\fR Always stream the response body.