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
9 changes: 9 additions & 0 deletions crates/atuin/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#![allow(clippy::use_self, clippy::missing_const_for_fn)] // not 100% reliable

use clap::Parser;
use clap::builder::Styles;
use clap::builder::styling::{AnsiColor, Effects};
use eyre::Result;

use command::AtuinCmd;
Expand All @@ -26,13 +28,20 @@ static HELP_TEMPLATE: &str = "\

{all-args}{after-help}";

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());

/// Magical shell history
#[derive(Parser)]
#[command(
author = "Ellie Huxtable <[email protected]>",
version = VERSION,
long_version = LONG_VERSION,
help_template(HELP_TEMPLATE),
styles = STYLES,
)]
struct Atuin {
#[command(subcommand)]
Expand Down
Loading