Skip to content

Commit

Permalink
bump version to v0.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ducaale committed Jan 27, 2022
1 parent 163e8f0 commit 03ccbcd
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 23 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.15.0] - 2022-01-27
### Features
- Add support for `--raw` flag, see #202 (@ducaale)
- Add Fruity theme, see #206 (@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.14.1"
version = "0.15.0"
authors = ["ducaale <sharaf.13@hotmail.com>"]
edition = "2018"
license = "MIT"
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ OPTIONS:
-m, --multipart Like --form, but force a multipart/form-data request even without files
--raw <RAW> Pass raw request data without extra processing
--pretty <STYLE> Controls output processing [possible values: all, colors, format, none]
-s, --style <THEME> Output coloring style [possible values: auto, solarized, monokai]
-s, --style <THEME> Output coloring style [possible values: auto, solarized, monokai, fruity]
--response-charset <ENCODING> Override the response encoding for terminal display purposes
--response-mime <MIME_TYPE> Override the response mime type for coloring and formatting for the terminal
-p, --print <FORMAT> String specifying what the output should contain
-h, --headers Print only the response headers, shortcut for --print=h
-b, --body Print only the response body, Shortcut for --print=b
-h, --headers Print only the response headers. Shortcut for --print=h
-b, --body Print only the response body. Shortcut for --print=b
-v, --verbose Print the whole request as well as the response
--all Show any intermediary requests/responses while following redirects with --follow
-P, --history-print <FORMAT> The same as --print but applies only to intermediary requests/responses
Expand Down
14 changes: 8 additions & 6 deletions completions/_xh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ _xh() {

local context curcontext="$curcontext" state line
_arguments "${_arguments_options[@]}" \
'--raw=[Pass raw request data without extra processing]' \
'--pretty=[Controls output processing]: :(all colors format none)' \
'-s+[Output coloring style]: :(auto solarized monokai)' \
'--style=[Output coloring style]: :(auto solarized monokai)' \
'-s+[Output coloring style]: :(auto solarized monokai fruity)' \
'--style=[Output coloring style]: :(auto solarized monokai fruity)' \
'--response-charset=[Override the response encoding for terminal display purposes]' \
'--response-mime=[Override the response mime type for coloring and formatting for the terminal]' \
'-p+[String specifying what the output should contain]' \
Expand Down Expand Up @@ -48,10 +49,10 @@ _xh() {
'--form[Serialize data items from the command line as form fields]' \
'-m[Like --form, but force a multipart/form-data request even without files]' \
'--multipart[Like --form, but force a multipart/form-data request even without files]' \
'-h[Print only the response headers, shortcut for --print=h]' \
'--headers[Print only the response headers, shortcut for --print=h]' \
'-b[Print only the response body, Shortcut for --print=b]' \
'--body[Print only the response body, Shortcut for --print=b]' \
'-h[Print only the response headers. Shortcut for --print=h]' \
'--headers[Print only the response headers. Shortcut for --print=h]' \
'-b[Print only the response body. Shortcut for --print=b]' \
'--body[Print only the response body. Shortcut for --print=b]' \
'-v[Print the whole request as well as the response]' \
'--verbose[Print the whole request as well as the response]' \
'--all[Show any intermediary requests/responses while following redirects with --follow]' \
Expand Down Expand Up @@ -105,6 +106,7 @@ _xh() {
'--no-print[]' \
'--no-proxy[]' \
'--no-quiet[]' \
'--no-raw[]' \
'--no-response-charset[]' \
'--no-response-mime[]' \
'--no-session[]' \
Expand Down
10 changes: 6 additions & 4 deletions completions/_xh.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ 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('-s', 's', [CompletionResultType]::ParameterName, 'Output coloring style')
[CompletionResult]::new('--style', 'style', [CompletionResultType]::ParameterName, 'Output coloring style')
Expand Down Expand Up @@ -53,10 +54,10 @@ Register-ArgumentCompleter -Native -CommandName 'xh' -ScriptBlock {
[CompletionResult]::new('--form', 'form', [CompletionResultType]::ParameterName, 'Serialize data items from the command line as form fields')
[CompletionResult]::new('-m', 'm', [CompletionResultType]::ParameterName, 'Like --form, but force a multipart/form-data request even without files')
[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('-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('-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('--all', 'all', [CompletionResultType]::ParameterName, 'Show any intermediary requests/responses while following redirects with --follow')
Expand Down Expand Up @@ -110,6 +111,7 @@ Register-ArgumentCompleter -Native -CommandName 'xh' -ScriptBlock {
[CompletionResult]::new('--no-print', 'no-print', [CompletionResultType]::ParameterName, 'no-print')
[CompletionResult]::new('--no-proxy', 'no-proxy', [CompletionResultType]::ParameterName, 'no-proxy')
[CompletionResult]::new('--no-quiet', 'no-quiet', [CompletionResultType]::ParameterName, 'no-quiet')
[CompletionResult]::new('--no-raw', 'no-raw', [CompletionResultType]::ParameterName, 'no-raw')
[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-session', 'no-session', [CompletionResultType]::ParameterName, 'no-session')
Expand Down
10 changes: 7 additions & 3 deletions completions/xh.bash
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,27 @@ _xh() {

case "${cmd}" in
xh)
opts=" -j -f -m -h -b -v -q -S -d -c -F -I -V -s -p -P -o -A -a --json --form --multipart --headers --body --verbose --all --quiet --stream --download --continue --ignore-netrc --offline --check-status --follow --native-tls --https --ignore-stdin --curl --curl-long --no-all --no-auth --no-auth-type --no-bearer --no-body --no-cert --no-cert-key --no-check-status --no-continue --no-curl --no-curl-long --no-default-scheme --no-download --no-follow --no-form --no-headers --no-history-print --no-http-version --no-https --no-ignore-netrc --no-ignore-stdin --no-json --no-max-redirects --no-multipart --no-native-tls --no-offline --no-output --no-pretty --no-print --no-proxy --no-quiet --no-response-charset --no-response-mime --no-session --no-session-read-only --no-ssl --no-stream --no-style --no-timeout --no-verbose --no-verify --help --version --pretty --style --response-charset --response-mime --print --history-print --output --session --session-read-only --auth-type --auth --bearer --max-redirects --timeout --proxy --verify --cert --cert-key --ssl --default-scheme --http-version <[METHOD] URL> <REQUEST_ITEM>... "
opts=" -j -f -m -h -b -v -q -S -d -c -F -I -V -s -p -P -o -A -a --json --form --multipart --headers --body --verbose --all --quiet --stream --download --continue --ignore-netrc --offline --check-status --follow --native-tls --https --ignore-stdin --curl --curl-long --no-all --no-auth --no-auth-type --no-bearer --no-body --no-cert --no-cert-key --no-check-status --no-continue --no-curl --no-curl-long --no-default-scheme --no-download --no-follow --no-form --no-headers --no-history-print --no-http-version --no-https --no-ignore-netrc --no-ignore-stdin --no-json --no-max-redirects --no-multipart --no-native-tls --no-offline --no-output --no-pretty --no-print --no-proxy --no-quiet --no-raw --no-response-charset --no-response-mime --no-session --no-session-read-only --no-ssl --no-stream --no-style --no-timeout --no-verbose --no-verify --help --version --raw --pretty --style --response-charset --response-mime --print --history-print --output --session --session-read-only --auth-type --auth --bearer --max-redirects --timeout --proxy --verify --cert --cert-key --ssl --default-scheme --http-version <[METHOD] URL> <REQUEST_ITEM>... "
if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0
fi
case "${prev}" in

--raw)
COMPREPLY=($(compgen -f "${cur}"))
return 0
;;
--pretty)
COMPREPLY=($(compgen -W "all colors format none" -- "${cur}"))
return 0
;;
--style)
COMPREPLY=($(compgen -W "auto solarized monokai" -- "${cur}"))
COMPREPLY=($(compgen -W "auto solarized monokai fruity" -- "${cur}"))
return 0
;;
-s)
COMPREPLY=($(compgen -W "auto solarized monokai" -- "${cur}"))
COMPREPLY=($(compgen -W "auto solarized monokai fruity" -- "${cur}"))
return 0
;;
--response-charset)
Expand Down
8 changes: 5 additions & 3 deletions completions/xh.fish
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
complete -c xh -l raw -d 'Pass raw request data without extra processing'
complete -c xh -l pretty -d 'Controls output processing' -r -f -a "all colors format none"
complete -c xh -s s -l style -d 'Output coloring style' -r -f -a "auto solarized monokai"
complete -c xh -s s -l style -d 'Output coloring style' -r -f -a "auto solarized monokai fruity"
complete -c xh -l response-charset -d 'Override the response encoding for terminal display purposes'
complete -c xh -l response-mime -d 'Override the response mime type for coloring and formatting for the terminal'
complete -c xh -s p -l print -d 'String specifying what the output should contain'
Expand All @@ -22,8 +23,8 @@ complete -c xh -l http-version -d 'HTTP version to use' -r -f -a "1 1.0 1.1 2"
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 -s m -l multipart -d 'Like --form, but force a multipart/form-data request even without files'
complete -c xh -s h -l headers -d 'Print only the response headers, shortcut for --print=h'
complete -c xh -s b -l body -d 'Print only the response body, Shortcut for --print=b'
complete -c xh -s h -l headers -d 'Print only the response headers. Shortcut for --print=h'
complete -c xh -s b -l body -d 'Print only the response body. Shortcut for --print=b'
complete -c xh -s v -l verbose -d 'Print the whole request as well as the response'
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'
Expand Down Expand Up @@ -70,6 +71,7 @@ complete -c xh -l no-pretty
complete -c xh -l no-print
complete -c xh -l no-proxy
complete -c xh -l no-quiet
complete -c xh -l no-raw
complete -c xh -l no-response-charset
complete -c xh -l no-response-mime
complete -c xh -l no-session
Expand Down
2 changes: 1 addition & 1 deletion doc/xh.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.13.
.TH XH "1" "December 2021" "xh 0.14.1" "User Commands"
.TH XH "1" "January 2022" "xh 0.15.0" "User Commands"
.SH NAME
xh \- Friendly and fast tool for sending HTTP requests
.SH SYNOPSIS
Expand Down

0 comments on commit 03ccbcd

Please sign in to comment.