summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.rs b/src/main.rs
index d7d15a5..72efe60 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -7,6 +7,7 @@ use clap::Parser;
#[derive(Parser)]
#[command(author, version, about, long_about = None)] // Read from `Cargo.toml`
+#[clap(disable_help_flag = true)]
struct Config {
/// The pattern to look for
pattern: String,
@@ -15,6 +16,10 @@ struct Config {
/// If no FILE is given, read standard input.
files: Vec<String>,
+ /// Print a help text and exit
+ #[arg(long, action = clap::ArgAction::Help)]
+ help: Option<bool>,
+
/// Ignores the case of the search string
#[arg(short, long)]
ignore_case: bool,