Skip to content

Commit

Permalink
bump version to v0.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ducaale committed Nov 19, 2023
1 parent 1675e41 commit 6ed5362
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Unreleased
## [0.20.0] - 2023-11-19
### Features
- Add `--resolve` for overriding DNS resolution, see #327 (@ducaale)

Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "xh"
version = "0.19.4"
version = "0.20.0"
authors = ["ducaale <[email protected]>"]
edition = "2021"
rust-version = "1.64.0"
Expand Down
2 changes: 2 additions & 0 deletions completions/_xh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ none\:"Disable both coloring and formatting"))' \
'--ssl=[Force a particular TLS version]:VERSION:(auto tls1 tls1.1 tls1.2 tls1.3)' \
'--default-scheme=[The default scheme to use if not specified in the URL]:SCHEME: ' \
'--http-version=[HTTP version to use]:VERSION:(1.0 1.1 2)' \
'*--resolve=[Override DNS resolution for specific domain to a custom IP]:HOST:ADDRESS: ' \
'--interface=[Bind to a network interface or local IP address]:NAME: ' \
'-j[(default) Serialize data items from the command line as a JSON object]' \
'--json[(default) Serialize data items from the command line as a JSON object]' \
Expand Down Expand Up @@ -127,6 +128,7 @@ none\:"Disable both coloring and formatting"))' \
'--no-default-scheme[]' \
'--no-https[]' \
'--no-http-version[]' \
'--no-resolve[]' \
'--no-interface[]' \
'--no-ipv4[]' \
'--no-ipv6[]' \
Expand Down
2 changes: 2 additions & 0 deletions completions/_xh.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Register-ArgumentCompleter -Native -CommandName 'xh' -ScriptBlock {
[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')
Expand Down Expand Up @@ -130,6 +131,7 @@ Register-ArgumentCompleter -Native -CommandName 'xh' -ScriptBlock {
[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')
Expand Down
6 changes: 5 additions & 1 deletion completions/xh.bash
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ _xh() {

case "${cmd}" in
xh)
opts="-j -f -s -p -h -b -m -v -P -q -S -o -d -c -A -a -F -4 -6 -I -V --json --form --multipart --raw --pretty --format-options --style --response-charset --response-mime --print --headers --body --meta --verbose --all --history-print --quiet --stream --output --download --continue --session --session-read-only --auth-type --auth --bearer --ignore-netrc --offline --check-status --follow --max-redirects --timeout --proxy --verify --cert --cert-key --ssl --native-tls --default-scheme --https --http-version --interface --ipv4 --ipv6 --ignore-stdin --curl --curl-long --help --no-json --no-form --no-multipart --no-raw --no-pretty --no-format-options --no-style --no-response-charset --no-response-mime --no-print --no-headers --no-body --no-meta --no-verbose --no-all --no-history-print --no-quiet --no-stream --no-output --no-download --no-continue --no-session --no-session-read-only --no-auth-type --no-auth --no-bearer --no-ignore-netrc --no-offline --no-check-status --no-follow --no-max-redirects --no-timeout --no-proxy --no-verify --no-cert --no-cert-key --no-ssl --no-native-tls --no-default-scheme --no-https --no-http-version --no-interface --no-ipv4 --no-ipv6 --no-ignore-stdin --no-curl --no-curl-long --no-help --version <[METHOD] URL> [REQUEST_ITEM]..."
opts="-j -f -s -p -h -b -m -v -P -q -S -o -d -c -A -a -F -4 -6 -I -V --json --form --multipart --raw --pretty --format-options --style --response-charset --response-mime --print --headers --body --meta --verbose --all --history-print --quiet --stream --output --download --continue --session --session-read-only --auth-type --auth --bearer --ignore-netrc --offline --check-status --follow --max-redirects --timeout --proxy --verify --cert --cert-key --ssl --native-tls --default-scheme --https --http-version --resolve --interface --ipv4 --ipv6 --ignore-stdin --curl --curl-long --help --no-json --no-form --no-multipart --no-raw --no-pretty --no-format-options --no-style --no-response-charset --no-response-mime --no-print --no-headers --no-body --no-meta --no-verbose --no-all --no-history-print --no-quiet --no-stream --no-output --no-download --no-continue --no-session --no-session-read-only --no-auth-type --no-auth --no-bearer --no-ignore-netrc --no-offline --no-check-status --no-follow --no-max-redirects --no-timeout --no-proxy --no-verify --no-cert --no-cert-key --no-ssl --no-native-tls --no-default-scheme --no-https --no-http-version --no-resolve --no-interface --no-ipv4 --no-ipv6 --no-ignore-stdin --no-curl --no-curl-long --no-help --version <[METHOD] URL> [REQUEST_ITEM]..."
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
Expand Down Expand Up @@ -141,6 +141,10 @@ _xh() {
COMPREPLY=($(compgen -W "1.0 1.1 2" -- "${cur}"))
return 0
;;
--resolve)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--interface)
COMPREPLY=($(compgen -f "${cur}"))
return 0
Expand Down
2 changes: 2 additions & 0 deletions completions/xh.fish
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ 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 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 }"
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'
complete -c xh -s f -l form -d 'Serialize data items from the command line as form fields'
Expand Down Expand Up @@ -87,6 +88,7 @@ complete -c xh -l no-native-tls
complete -c xh -l no-default-scheme
complete -c xh -l no-https
complete -c xh -l no-http-version
complete -c xh -l no-resolve
complete -c xh -l no-interface
complete -c xh -l no-ipv4
complete -c xh -l no-ipv6
Expand Down
9 changes: 8 additions & 1 deletion doc/xh.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH XH 1 2023-10-22 0.19.4 "User Commands"
.TH XH 1 2023-11-19 0.20.0 "User Commands"

.SH NAME
xh \- Friendly and fast tool for sending HTTP requests
Expand Down Expand Up @@ -280,6 +280,13 @@ HTTP version to use.

[possible values: 1.0, 1.1, 2]
.TP 4
\fB\-\-resolve\fR=\fIHOST:ADDRESS\fR
Override DNS resolution for specific domain to a custom IP.

You can override multiple domains by repeating this option.

Example: \-\-resolve=example.com:127.0.0.1.
.TP 4
\fB\-\-interface\fR=\fINAME\fR
Bind to a network interface or local IP address.

Expand Down

0 comments on commit 6ed5362

Please sign in to comment.