From 5302a5418244bc0fb3066d1e799aafa79b89170b Mon Sep 17 00:00:00 2001 From: Samer Afach Date: Fri, 4 Oct 2024 22:07:38 +0400 Subject: [PATCH] Add better help information --- src/program_options.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/program_options.rs b/src/program_options.rs index 0949295..70e1109 100644 --- a/src/program_options.rs +++ b/src/program_options.rs @@ -3,6 +3,13 @@ use std::{collections::BTreeMap, num::NonZeroU64}; use clap::{Parser, ValueEnum}; #[derive(Parser, Clone, Debug, Default)] +#[command( + name = "thash", + version = env!("CARGO_PKG_VERSION"), + long_about = "A fast and versatile terminal hashing program that prints the hash digest to stdout, with many hashing algorithms, many output formats, and support to request the number of iterations for hashing.", + author = "TheQuantumPhysicist ", + after_help = r#"Pipe data into thash to calculate their hash digest. Example: echo -n "abc" | thash -a blake3"# +)] pub struct THashOptions { /// The algorithm that will be used to hash the given data. #[arg(long, short('a'), value_name("ALGORITHM"), default_value_t = HashAlgorithm::default())]