-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Colored help by default ? #39
Comments
extern crate clap;
extern crate structopt;
#[macro_use]
extern crate structopt_derive;
use structopt::StructOpt;
#[derive(StructOpt, Debug)]
#[structopt(setting_raw = "clap::AppSettings::ColoredHelp")]
struct Opt {
#[structopt(short = "s")]
speed: bool,
#[structopt(short = "d")]
debug: bool,
}
fn main() {
let opt = Opt::from_args();
println!("{:?}", opt);
} Does it fix your problem? |
Indeed it does, thanks ! |
Update: when trying that: #[derive(StructOpt, Debug)]
#[structopt(name = "flashinit", about = "Boot disk populator.",
setting_raw = "clap::AppSettings::ColoredHelp")]
struct Opt {
#[structopt(help = "Disk device or disk image")]
input: String,
} I've got this:
|
You have to I'm open to any improvement of the doc, feel free to submit a PR if you are inspired. I tag this issue to doc, and close it when the doc is improved on this point. |
Oh, so I have to also add |
|
OK, I've added a note in the doc, see #40 |
fixed by #40 |
allow format failures
Hi,
Would it be possible to have
AppSettings::ColoredHelp
by default, or at least an easy way to enable it without calling into the underlyingclap
?The text was updated successfully, but these errors were encountered: