I've never understood why so many applications pipe help output to STDERR.
It's not an error... I asked for the output! shrug
I've never understood why so many applications pipe help output to STDERR.
It's not an error... I asked for the output! shrug
More importantly, usage information doesn't conform to the structure of ordinary program output, and can therefore be annoying or even dangerous if inadvertently treated as such, so it really, really does belong on stderr for any program whose stdout might reasonably be used as input to another program.
> usage information doesn't conform to the structure of ordinary program output
This is weak. Pretty much every command line program will have multiple flags that change the output in some profound way. Why should --help get special treatment?
Most people think stderr (so as not to muck up pipelines when you get the invocation syntax wrong). But then there is also the cleverer option of using stdout if and only if the help is explicitly requested, which seems to be justifiable, popular in the survey, but (I think) not much implemented.