Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/cmd/cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand All @@ -39,6 +46,7 @@ https://github.com/ajeetdsouza/zoxide
disable_help_subcommand = true,
propagate_version = true,
version,
styles = STYLES,
)]
pub enum Cmd {
Add(Add),
Expand Down
Loading