Skip to content

Redirect default -h help to a custom logger instead of the terminal #5469

Answered by epage
eugenesvk asked this question in Q&A
Discussion options

You must be logged in to vote

Help is reported up as an error. You could use a try_ variant of a parser function so you can check the error, see if its use_stderr or if the ErrorKind is for help, and then print it a custom way.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@eugenesvk
Comment options

Answer selected by eugenesvk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants