Merge 8e7f2406d4 into c8a47a068b
This commit is contained in:
commit
42648cca5d
|
|
@ -2,7 +2,8 @@
|
||||||
|
|
||||||
use std::path::PathBuf;
|
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};
|
use clap::{Parser, Subcommand, ValueEnum, ValueHint};
|
||||||
|
|
||||||
struct HelpTemplate;
|
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)]
|
#[derive(Debug, Parser)]
|
||||||
#[clap(
|
#[clap(
|
||||||
about,
|
about,
|
||||||
|
|
@ -39,6 +46,7 @@ https://github.com/ajeetdsouza/zoxide
|
||||||
disable_help_subcommand = true,
|
disable_help_subcommand = true,
|
||||||
propagate_version = true,
|
propagate_version = true,
|
||||||
version,
|
version,
|
||||||
|
styles = STYLES,
|
||||||
)]
|
)]
|
||||||
pub enum Cmd {
|
pub enum Cmd {
|
||||||
Add(Add),
|
Add(Add),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue