mirror of
https://github.com/Orange-OpenSource/hurl.git
synced 2024-11-27 08:19:22 +03:00
Update help/man for hurlfmt
This commit is contained in:
parent
13d3f9a6b7
commit
f62fba6ab3
@ -13,7 +13,7 @@ hurlfmt - format Hurl files
|
|||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
|
|
||||||
.B hurlfmt
|
.B hurlfmt
|
||||||
formats Hurl files and converts them to other formats.
|
formats Hurl files and converts them from/to other formats.
|
||||||
|
|
||||||
With no FILE, read standard input.
|
With no FILE, read standard input.
|
||||||
|
|
||||||
@ -48,6 +48,12 @@ hurlfmt can be used to convert to other format.
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
hurlfmt can also be used to convert a curl command-line to Hurl
|
||||||
|
|
||||||
|
$ echo "curl http://localhost:8000/custom-headers -H 'Fruit:Raspberry'" | hurlfmt --in curl
|
||||||
|
GET http://localhost:8000/custom-headers
|
||||||
|
Fruit: Raspberry
|
||||||
|
|
||||||
|
|
||||||
.SH OPTIONS
|
.SH OPTIONS
|
||||||
|
|
||||||
@ -68,15 +74,14 @@ Colorize Output.
|
|||||||
This can not be used \fI--in-place\fP.
|
This can not be used \fI--in-place\fP.
|
||||||
|
|
||||||
|
|
||||||
.IP "--format "
|
|
||||||
|
|
||||||
Specify output format: text (default), json or html.
|
|
||||||
|
|
||||||
|
|
||||||
.IP "-h, --help "
|
.IP "-h, --help "
|
||||||
|
|
||||||
Usage help.
|
Usage help.
|
||||||
|
|
||||||
|
.IP "--in "
|
||||||
|
|
||||||
|
Specify input format: hurl (default) or curl
|
||||||
|
|
||||||
|
|
||||||
.IP "--inplace "
|
.IP "--inplace "
|
||||||
|
|
||||||
@ -90,12 +95,10 @@ This can be used only with text output.
|
|||||||
Do not colorize Output.
|
Do not colorize Output.
|
||||||
|
|
||||||
|
|
||||||
.IP "--no-format "
|
.IP "--out "
|
||||||
|
|
||||||
Do not format output.
|
|
||||||
|
|
||||||
By default text output is automatically formatted.
|
|
||||||
|
|
||||||
|
Specify output format: hurl (default), json or html
|
||||||
|
|
||||||
.IP "-o, --output <file> "
|
.IP "-o, --output <file> "
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ hurlfmt - format Hurl files
|
|||||||
|
|
||||||
## DESCRIPTION
|
## DESCRIPTION
|
||||||
|
|
||||||
**hurlfmt** formats Hurl files and converts them to other formats.
|
**hurlfmt** formats Hurl files and converts them from/to other formats.
|
||||||
|
|
||||||
With no FILE, read standard input.
|
With no FILE, read standard input.
|
||||||
|
|
||||||
@ -49,6 +49,14 @@ $ hurl hello.hurl --output json | jq
|
|||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
hurlfmt can also be used to convert a curl command-line to Hurl
|
||||||
|
|
||||||
|
```
|
||||||
|
$ echo "curl http://localhost:8000/custom-headers -H 'Fruit:Raspberry'" | hurlfmt --in curl
|
||||||
|
GET http://localhost:8000/custom-headers
|
||||||
|
Fruit: Raspberry
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
## OPTIONS
|
## OPTIONS
|
||||||
|
|
||||||
@ -69,15 +77,14 @@ Colorize Output.
|
|||||||
This can not be used [--in-place](#inplace).
|
This can not be used [--in-place](#inplace).
|
||||||
|
|
||||||
|
|
||||||
### --format {#output}
|
|
||||||
|
|
||||||
Specify output format: text (default), json or html.
|
|
||||||
|
|
||||||
|
|
||||||
### -h, --help {#help}
|
### -h, --help {#help}
|
||||||
|
|
||||||
Usage help.
|
Usage help.
|
||||||
|
|
||||||
|
### --in {#input-format}
|
||||||
|
|
||||||
|
Specify input format: hurl (default) or curl
|
||||||
|
|
||||||
|
|
||||||
### --inplace {#inplace}
|
### --inplace {#inplace}
|
||||||
|
|
||||||
@ -91,12 +98,10 @@ This can be used only with text output.
|
|||||||
Do not colorize Output.
|
Do not colorize Output.
|
||||||
|
|
||||||
|
|
||||||
### --no-format {#noformat}
|
### --out {#output-format}
|
||||||
|
|
||||||
Do not format output.
|
|
||||||
|
|
||||||
By default text output is automatically formatted.
|
|
||||||
|
|
||||||
|
Specify output format: hurl (default), json or html
|
||||||
|
|
||||||
### -o, --output <file> {#output}
|
### -o, --output <file> {#output}
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ pub fn input_format() -> clap::Arg {
|
|||||||
clap::Arg::new("input_format")
|
clap::Arg::new("input_format")
|
||||||
.long("in")
|
.long("in")
|
||||||
.value_name("FORMAT")
|
.value_name("FORMAT")
|
||||||
.help("Specify input format: hurl")
|
.help("Specify input format: hurl or curl")
|
||||||
.conflicts_with("check")
|
.conflicts_with("check")
|
||||||
.default_value("hurl")
|
.default_value("hurl")
|
||||||
.num_args(1)
|
.num_args(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user