From 21e998e5b2f8f2cef28da2b5ca83b9bf9dde5c60 Mon Sep 17 00:00:00 2001 From: Mohamed Daahir Date: Tue, 18 Feb 2025 08:15:49 +0000 Subject: [PATCH] bump version to v0.24.0 --- CHANGELOG.md | 2 +- Cargo.lock | 2 +- Cargo.toml | 2 +- completions/_xh | 4 ++-- completions/_xh.ps1 | 4 ++-- completions/xh.elv | 4 ++-- completions/xh.fish | 35 ++++++++++++++++++++++++++++------- completions/xh.nu | 8 ++++---- doc/xh.1 | 10 +++++++--- 9 files changed, 48 insertions(+), 23 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b3932ec..4b61325 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## Unreleased +## [0.24.0] - 2025-02-18 ### Features - Add `--generate` option to generate the man page and shell completions at runtime, see #393 (@fgimian) diff --git a/Cargo.lock b/Cargo.lock index 1c78fb8..8ac29db 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2780,7 +2780,7 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" [[package]] name = "xh" -version = "0.23.1" +version = "0.24.0" dependencies = [ "anyhow", "assert_cmd", diff --git a/Cargo.toml b/Cargo.toml index 1ba36c7..80b625b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xh" -version = "0.23.1" +version = "0.24.0" authors = ["ducaale "] edition = "2021" rust-version = "1.74.0" diff --git a/completions/_xh b/completions/_xh index 2f1edfd..1c30de0 100644 --- a/completions/_xh +++ b/completions/_xh @@ -69,8 +69,8 @@ none\:"Disable both coloring and formatting"))' \ '*--quiet[Do not print to stdout or stderr]' \ '-S[Always stream the response body]' \ '--stream[Always stream the response body]' \ -'*-x[Content compressed (encoded) with Deflate algorithm. The Content-Encoding header is set to deflate]' \ -'*--compress[Content compressed (encoded) with Deflate algorithm. The Content-Encoding header is set to deflate]' \ +'*-x[Content compressed (encoded) with Deflate algorithm]' \ +'*--compress[Content compressed (encoded) with Deflate algorithm]' \ '-d[Download the body to a file instead of printing it]' \ '--download[Download the body to a file instead of printing it]' \ '-c[Resume an interrupted download. Requires --download and --output]' \ diff --git a/completions/_xh.ps1 b/completions/_xh.ps1 index d37ef27..ec01e4a 100644 --- a/completions/_xh.ps1 +++ b/completions/_xh.ps1 @@ -72,8 +72,8 @@ Register-ArgumentCompleter -Native -CommandName 'xh' -ScriptBlock { [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('-x', '-x', [CompletionResultType]::ParameterName, 'Content compressed (encoded) with Deflate algorithm. The Content-Encoding header is set to deflate') - [CompletionResult]::new('--compress', '--compress', [CompletionResultType]::ParameterName, 'Content compressed (encoded) with Deflate algorithm. The Content-Encoding header is set to deflate') + [CompletionResult]::new('-x', '-x', [CompletionResultType]::ParameterName, 'Content compressed (encoded) with Deflate algorithm') + [CompletionResult]::new('--compress', '--compress', [CompletionResultType]::ParameterName, 'Content compressed (encoded) with Deflate algorithm') [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') diff --git a/completions/xh.elv b/completions/xh.elv index e13f31a..99cdc0a 100644 --- a/completions/xh.elv +++ b/completions/xh.elv @@ -69,8 +69,8 @@ set edit:completion:arg-completer[xh] = {|@words| cand --quiet 'Do not print to stdout or stderr' cand -S 'Always stream the response body' cand --stream 'Always stream the response body' - cand -x 'Content compressed (encoded) with Deflate algorithm. The Content-Encoding header is set to deflate' - cand --compress 'Content compressed (encoded) with Deflate algorithm. The Content-Encoding header is set to deflate' + cand -x 'Content compressed (encoded) with Deflate algorithm' + cand --compress 'Content compressed (encoded) with Deflate algorithm' cand -d 'Download the body to a file instead of printing it' cand --download 'Download the body to a file instead of printing it' cand -c 'Resume an interrupted download. Requires --download and --output' diff --git a/completions/xh.fish b/completions/xh.fish index 1627009..8c8a0b9 100644 --- a/completions/xh.fish +++ b/completions/xh.fish @@ -1,7 +1,13 @@ 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\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 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\t'',solarized\t'',monokai\t'',fruity\t''}" +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 +15,9 @@ 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\t'',bearer\t'',digest\t''}" +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,12 +26,25 @@ 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\t'',tls1\t'',tls1.1\t'',tls1.2\t'',tls1.3\t''}" +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\t'',1.1\t'',2\t'',2-prior-knowledge\t''}" +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 -l generate -d 'Generate shell completions or man pages' -r -f -a "{complete-bash\t'',complete-elvish\t'',complete-fish\t'',complete-nushell\t'',complete-powershell\t'',complete-zsh\t'',man\t''}" +complete -c xh -l generate -d 'Generate shell completions or man pages' -r -f -a "complete-bash\t'' +complete-elvish\t'' +complete-fish\t'' +complete-nushell\t'' +complete-powershell\t'' +complete-zsh\t'' +man\t''" complete -c xh -s j -l json -d '(default) Serialize data items from the command line as a JSON object' complete -c xh -s f -l form -d 'Serialize data items from the command line as form fields' complete -c xh -l multipart -d 'Like --form, but force a multipart/form-data request even without files' @@ -35,7 +56,7 @@ complete -c xh -l debug -d 'Print full error stack traces and debug log messages complete -c xh -l all -d 'Show any intermediary requests/responses while following redirects with --follow' complete -c xh -s q -l quiet -d 'Do not print to stdout or stderr' complete -c xh -s S -l stream -d 'Always stream the response body' -complete -c xh -s x -l compress -d 'Content compressed (encoded) with Deflate algorithm. The Content-Encoding header is set to deflate' +complete -c xh -s x -l compress -d 'Content compressed (encoded) with Deflate algorithm' complete -c xh -s d -l download -d 'Download the body to a file instead of printing it' complete -c xh -s c -l continue -d 'Resume an interrupted download. Requires --download and --output' complete -c xh -l ignore-netrc -d 'Do not use credentials from .netrc' diff --git a/completions/xh.nu b/completions/xh.nu index 564c055..929562c 100644 --- a/completions/xh.nu +++ b/completions/xh.nu @@ -45,8 +45,8 @@ module completions { --history-print(-P): string # The same as --print but applies only to intermediary requests/responses --quiet(-q) # Do not print to stdout or stderr --stream(-S) # Always stream the response body - --compress(-x) # Content compressed (encoded) with Deflate algorithm. The Content-Encoding header is set to deflate - --output(-o): string # Save output to FILE instead of stdout + --compress(-x) # Content compressed (encoded) with Deflate algorithm + --output(-o): path # Save output to FILE instead of stdout --download(-d) # Download the body to a file instead of printing it --continue(-c) # Resume an interrupted download. Requires --download and --output --session: string # Create, or reuse and update a session @@ -62,8 +62,8 @@ module completions { --timeout: string # Connection timeout of the request --proxy: string # Use a proxy for a protocol. For example: --proxy https:http://proxy.host:8080 --verify: string # If "no", skip SSL verification. If a file path, use it as a CA bundle - --cert: string # Use a client side certificate for SSL - --cert-key: string # A private key file to use with --cert + --cert: path # Use a client side certificate for SSL + --cert-key: path # A private key file to use with --cert --ssl: string@"nu-complete xh ssl" # Force a particular TLS version --native-tls # Use the system TLS library instead of rustls (if enabled at compile time) --default-scheme: string # The default scheme to use if not specified in the URL diff --git a/doc/xh.1 b/doc/xh.1 index 7452cb7..c0bd7ca 100644 --- a/doc/xh.1 +++ b/doc/xh.1 @@ -1,4 +1,4 @@ -.TH XH 1 2025-02-04 0.23.1 "User Commands" +.TH XH 1 2025-02-18 0.24.0 "User Commands" .SH NAME xh \- Friendly and fast tool for sending HTTP requests @@ -189,9 +189,13 @@ Using quiet twice i.e. \-qq will suppress warnings as well. Always stream the response body. .TP 4 \fB\-x\fR, \fB\-\-compress\fR -Content compressed (encoded) with Deflate algorithm. The Content\-Encoding header is set to deflate. +Content compressed (encoded) with Deflate algorithm. -Compression is skipped if it appears that compression ratio is negative. Compression can be forced by repeating this option. Note: Compression cannot be forced if the Content\-Encoding request header is present. +The Content\-Encoding header is set to deflate. + +Compression is skipped if it appears that compression ratio is negative. Compression can be forced by repeating this option. + +Note: Compression cannot be used if the Content\-Encoding request header is present. .TP 4 \fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR Save output to FILE instead of stdout.