Open wenzeslaus opened 3 years ago
Fully agreed, the --help
flag output to stderr rather than stdout is highly confusing.
Option --help-text
is output to stdout. It is undocumented. I had to dig though the code to find it. It should be documented, at a minimum.
Is your feature request related to a problem?
In terminal, piping help into grep does nothing - it just gives whole help:
This is unexpected as, e.g.:
gives:
Same works for GDAL:
It also fits with a guideline "stdout should give user what the user asked for".
Also within GRASS,
module_name --script
and--interface-description
go to stdout, not stderr like--help
.Describe the solution you'd like
Output
--help
to standard output, not standard error output.Describe alternatives you've considered
There is a workaround - redirecting the stderr to stdout, but why the modules should behave differently than other tools?
Additional context
This is similar to misuse of stderr for composing human readable outputs in #1129, but it is a separate issue.