aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorConrad Ludgate <conradludgate@gmail.com>2022-10-18 09:50:22 +0100
committerGitHub <noreply@github.com>2022-10-18 09:50:22 +0100
commit5e2c438dabc74d7e87fad46c725501753a0a8a26 (patch)
treec6e1b3aea892e7150cd1d94bd13c68ee2efcea42 /src/main.rs
parentAdd message begging for help lol 🐢 (#569) (diff)
downloadatuin-5e2c438dabc74d7e87fad46c725501753a0a8a26.zip
Upgrade clap (#568)
Diffstat (limited to '')
-rw-r--r--src/main.rs18
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,
}