Skip to content

Commit

Permalink
feat: Bring colors to help message (#1650)
Browse files Browse the repository at this point in the history
Co-authored-by: Leigh McCulloch <[email protected]>
  • Loading branch information
Abeeujah and leighmcculloch authored Oct 4, 2024
1 parent 88a8ca9 commit d37632a
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion cmd/soroban-cli/src/commands/global.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,24 @@
use clap::arg;
use clap::{
arg,
builder::styling::{AnsiColor, Effects, Styles},
};
use std::path::PathBuf;

use super::config;

const USAGE_STYLES: Styles = Styles::styled()
.header(AnsiColor::Green.on_default().effects(Effects::BOLD))
.usage(AnsiColor::Green.on_default().effects(Effects::BOLD))
.literal(AnsiColor::Cyan.on_default().effects(Effects::BOLD))
.placeholder(AnsiColor::Cyan.on_default().effects(Effects::BOLD))
.error(AnsiColor::Red.on_default().effects(Effects::BOLD))
.valid(AnsiColor::Cyan.on_default().effects(Effects::BOLD))
.invalid(AnsiColor::Yellow.on_default().effects(Effects::BOLD));

#[derive(Debug, clap::Args, Clone, Default)]
#[group(skip)]
#[allow(clippy::struct_excessive_bools)]
#[command(styles = USAGE_STYLES)]
pub struct Args {
#[clap(flatten)]
pub locator: config::locator::Args,
Expand Down

0 comments on commit d37632a

Please sign in to comment.