Repository: google/argh (language: rust)

Issue:
Display help on "unrecognized argument"?
Is there a way to display the help message when an unknown flag is passed?


Discussion / hints:

Fix patch:
diff --git a/argh/src/lib.rs b/argh/src/lib.rs
index 984d927..bba8f73 100644
--- a/argh/src/lib.rs
+++ b/argh/src/lib.rs
@@ -501,7 +501,7 @@ pub fn from_env<T: TopLevelCommand>() -> T {
                 0
             }
             Err(()) => {
-                eprintln!("{}", early_exit.output);
+                eprintln!("{}\nRun {} --help for more information.", early_exit.output, cmd);
                 1
             }
         })
@@ -527,7 +527,7 @@ pub fn cargo_from_env<T: TopLevelCommand>() -> T {
                 0
             }
             Err(()) => {
-                eprintln!("{}", early_exit.output);
+                eprintln!("{}\nRun --help for more information.", early_exit.output);
                 1
             }
         })


Test patch: