Skip to content

Commit aa8efdd

Browse files
committed
color for all grit commands/subcommands
1 parent eb7388c commit aa8efdd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Diff for: src/main.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ use structopt::StructOpt;
44

55
mod options {
66
use structopt::StructOpt;
7+
use structopt::clap::AppSettings;
78

89
#[derive(Debug, StructOpt)]
910
#[structopt(about = "The git, simply swift")]
10-
#[structopt(setting = structopt::clap::AppSettings::SubcommandRequired)]
11+
#[structopt(settings = &[AppSettings::SubcommandRequired,
12+
AppSettings::ColoredHelp])]
1113
pub struct Args {
1214
#[structopt(subcommand)]
1315
pub cmd: Subcommands,
@@ -17,6 +19,7 @@ mod options {
1719
pub enum Subcommands {
1820
/// Initialize the repository in the current directory.
1921
#[structopt(alias = "initialize")]
22+
#[structopt(setting = AppSettings::ColoredHelp)]
2023
Init,
2124
}
2225
}

0 commit comments

Comments
 (0)