'app --help' should go to stdout or stderr?

command-line-interface, shell, stderr, stdout

Solution

`stdout` if the user requested it with `--help` for example, makes it easier to pipe to less, grep it etc.

`stderr` if you are showing the help text because there was a problem, e.g. parsing the command line arguments.

Problem

I think stdout, so you can easily grep, what do you think?

Original source