diff --git a/Cargo.lock b/Cargo.lock index d1539763..c13bb9b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2299,7 +2299,7 @@ dependencies = [ [[package]] name = "xh" -version = "0.18.0" +version = "0.19.0" dependencies = [ "anyhow", "assert_cmd", diff --git a/Cargo.toml b/Cargo.toml index f8091fa1..6b8cdf88 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "xh" -version = "0.18.0" +version = "0.19.0" authors = ["ducaale "] edition = "2021" rust-version = "1.64.0" diff --git a/completions/_xh b/completions/_xh index 08926a00..4b57bcd9 100644 --- a/completions/_xh +++ b/completions/_xh @@ -20,7 +20,7 @@ _xh() { colors\:"Apply syntax highlighting to output" format\:"Pretty-print json and sort headers" none\:"Disable both coloring and formatting"))' \ -'--format-options=[Set output formatting options. The only currently implemented option is json.indent]:FORMAT_OPTIONS: ' \ +'*--format-options=[Set output formatting options]:FORMAT_OPTIONS: ' \ '-s+[Output coloring style]:THEME:(auto solarized monokai fruity)' \ '--style=[Output coloring style]:THEME:(auto solarized monokai fruity)' \ '--response-charset=[Override the response encoding for terminal display purposes]:ENCODING: ' \ diff --git a/completions/_xh.ps1 b/completions/_xh.ps1 index 24454db0..2154bf89 100644 --- a/completions/_xh.ps1 +++ b/completions/_xh.ps1 @@ -23,7 +23,7 @@ Register-ArgumentCompleter -Native -CommandName 'xh' -ScriptBlock { '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. The only currently implemented option is json.indent') + [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') diff --git a/completions/xh.fish b/completions/xh.fish index f2cfd04a..57758f80 100644 --- a/completions/xh.fish +++ b/completions/xh.fish @@ -1,6 +1,6 @@ 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 format-options -d 'Set output formatting options. The only currently implemented option is json.indent' -r +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 -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 diff --git a/doc/xh.1 b/doc/xh.1 index ca1b7ee6..27e559ce 100644 --- a/doc/xh.1 +++ b/doc/xh.1 @@ -1,4 +1,4 @@ -.TH XH 1 2023-08-26 0.18.0 "User Commands" +.TH XH 1 2023-10-09 0.19.0 "User Commands" .SH NAME xh \- Friendly and fast tool for sending HTTP requests @@ -117,11 +117,14 @@ Controls output processing. Possible values are: Defaults to "format" if the NO_COLOR env is set and to "none" if stdout is not tty. .TP 4 \fB\-\-format\-options\fR=\fIFORMAT_OPTIONS\fR -Set output formatting options. The only currently implemented option is json.indent. +Set output formatting options. Supported option are: -Different options need to be separated by a comma. + json.indent: + json.format: + headers.sort: -Example: \-\-format\-options=json.indent:2. +Example: \-\-format\-options=json.indent:2,headers.sort:false + . .TP 4 \fB\-s\fR, \fB\-\-style\fR=\fITHEME\fR Output coloring style.