diff options
| author | Conrad Ludgate <conradludgate@gmail.com> | 2022-10-18 09:50:22 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-18 09:50:22 +0100 |
| commit | 5e2c438dabc74d7e87fad46c725501753a0a8a26 (patch) | |
| tree | c6e1b3aea892e7150cd1d94bd13c68ee2efcea42 /src/main.rs | |
| parent | Add message begging for help lol 🐢 (#569) (diff) | |
| download | atuin-5e2c438dabc74d7e87fad46c725501753a0a8a26.zip | |
Upgrade clap (#568)
Diffstat (limited to 'src/main.rs')
| -rw-r--r-- | src/main.rs | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/main.rs b/src/main.rs index 798f7a23..2f81f4fc 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,7 @@ #![warn(clippy::pedantic, clippy::nursery)] #![allow(clippy::use_self, clippy::missing_const_for_fn)] // not 100% reliable -use clap::{AppSettings, Parser}; +use clap::Parser; use eyre::Result; use command::AtuinCmd; @@ -9,15 +9,25 @@ mod command; const VERSION: &str = env!("CARGO_PKG_VERSION"); +static HELP_TEMPLATE: &str = "\ +{before-help}{name} {version} +{author} +{about} + +{usage-heading} + {usage} + +{all-args}{after-help}"; + /// Magical shell history #[derive(Parser)] -#[clap( +#[command( author = "Ellie Huxtable <e@elm.sh>", version = VERSION, - global_setting(AppSettings::DeriveDisplayOrder), + help_template(HELP_TEMPLATE), )] struct Atuin { - #[clap(subcommand)] + #[command(subcommand)] atuin: AtuinCmd, } |
