This commit is contained in:
Filip Czaplicki 2026-05-23 11:45:43 +08:00 committed by GitHub
commit 42648cca5d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 1 deletions

View File

@ -2,7 +2,8 @@
use std::path::PathBuf;
use clap::builder::{IntoResettable, Resettable, StyledStr};
use clap::builder::styling::{AnsiColor, Effects};
use clap::builder::{IntoResettable, Resettable, StyledStr, Styles};
use clap::{Parser, Subcommand, ValueEnum, ValueHint};
struct HelpTemplate;
@ -31,6 +32,12 @@ https://github.com/ajeetdsouza/zoxide
}
}
const STYLES: Styles = Styles::styled()
.header(AnsiColor::Yellow.on_default().effects(Effects::BOLD))
.usage(AnsiColor::Green.on_default().effects(Effects::BOLD))
.literal(AnsiColor::Green.on_default().effects(Effects::BOLD))
.placeholder(AnsiColor::Green.on_default());
#[derive(Debug, Parser)]
#[clap(
about,
@ -39,6 +46,7 @@ https://github.com/ajeetdsouza/zoxide
disable_help_subcommand = true,
propagate_version = true,
version,
styles = STYLES,
)]
pub enum Cmd {
Add(Add),