From 797a22324b76e16156da5699e25f6efa7108f98a Mon Sep 17 00:00:00 2001 From: Valerie Date: Thu, 7 Dec 2023 11:09:52 -0500 Subject: [PATCH] added more useful messaging for flags without extended help text --- src/help.rs | 8 +++++++- src/main.rs | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/help.rs b/src/help.rs index e048cf1..e0a0c69 100644 --- a/src/help.rs +++ b/src/help.rs @@ -1,5 +1,7 @@ //! help and list text +use std::process::exit; + use crate::VERSION; /// displays the program's help text @@ -156,7 +158,11 @@ names: _ - => { help_text(); } + => { + println!("pride: no help found for {flag}!\n"); + help_text(); + exit(1); + } } } diff --git a/src/main.rs b/src/main.rs index 69793f4..5280d87 100644 --- a/src/main.rs +++ b/src/main.rs @@ -158,8 +158,8 @@ fn main() { Some("pansexual" | "pan") => flag::pansexual(), - Some("polyamory" | "polyamorous" | "poly") - => complex::polyamory(small), +// Some("polyamory" | "polyamorous" | "poly") +// => complex::polyamory(small), Some("polysexual") => flag::polysexual(),