You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 1, 2022. It is now read-only.
use clap::Clap;#[derive(Clap,Debug)]#[clap(name = "xh")]structCli{/// Optional key-value pairs to be included in the request.////// - key:=value to add a complex JSON value (e.g. `numbers:=[1,2,3]`)/// - key@filename to upload a file from filename (with --form)/// - header:value to add a header/// - header: to unset a header/// - header; to add a header with an empty value////// A backslash can be used to escape special characters (e.g. weird\:key=value).#[clap(value_name = "REQUEST_ITEM")]raw_rest_args:Vec<String>}fnmain(){let _ = Cli::parse();}
Steps to reproduce the bug with the above code
cargo run -- --help
Actual Behaviour
ARGS:
<REQUEST_ITEM>...
Optional key-value pairs to be included in the request.
* key==value to add a parameter to the URL \n * key=value to add a JSON field (--json)
or form field (--form) * key:=value to add a complex JSON value (e.g.
`numbers:=[1,2,3]`) * key@filename to upload a file from filename (with --form) *
header:value to add a header * header: to unset a header * header; to add a header with
an empty value
A backslash can be used to escape special characters (e.g. weird\:key=value).
Expected Behaviour
ARGS:
<REQUEST_ITEM>...
Optional key-value pairs to be included in the request.
* key==value to add a parameter to the URL
* key=value to add a JSON field (--json) or form field (--form)
* key:=value to add a complex JSON value (e.g. `numbers:=[1,2,3]`)
* key@filename to upload a file from filename (with --form)
* header:value to add a header
* header: to unset a header
* header; to add a header with an empty value
A backslash can be used to escape special characters (e.g. weird\:key=value).
Additional Context
In StructOpt, it possible to use the long_help attribute to preserve newlines but I couldn't find something similar in clap-derive.
Just found that it is called long_about in clap-derive.
Debug Output
Will add if requested
The text was updated successfully, but these errors were encountered:
Saturday Mar 06, 2021 at 20:39 GMT
Originally opened as clap-rs/clap#2389
Please complete the following tasks
Rust Version
rustc 1.48.0 (7eac88abb 2020-11-16)
Clap Version
3.0.0-beta.2
Minimal reproducible code
Steps to reproduce the bug with the above code
Actual Behaviour
Expected Behaviour
Additional Context
In StructOpt, it possible to use the
long_help
attribute to preserve newlines butI couldn't find something similar in clap-derive.Just found that it is called
long_about
in clap-derive.Debug Output
Will add if requested
The text was updated successfully, but these errors were encountered: