Try to be more careful with --help printing

Namely, this will:

 - print --help to stdout rather than stderr
 - not print full usage when errors happen
 - add a prompt to use --help for more info on error

This should make it more greppable, clearer, and less spammy.
This commit is contained in:
Evan Typanski 2025-01-07 11:39:38 -05:00
parent adf02b487f
commit 0b2f843db9
4 changed files with 164 additions and 139 deletions

View file

@ -94,11 +94,10 @@ struct Options {
Options parse_cmdline(int argc, char** argv);
/**
* Print command-line Zeek usage information and exit.
* Print command-line Zeek usage information.
* @param prog the name/path of the Zeek command-line invocation
* @code the exit code to use
*/
void usage(const char* prog, int code = 1);
void usage(const char* prog);
/**
* @return true if zeek is running a "fake" DNS resolver, else false.