For src CLI, it looks like help text with --help is output to either stderr or a mix of stdout and stderr.
For example, src --help seems to output everything to stderr. src lsif upload --help seems to output some text to stdout and some to stderr.
In either case, you need an extra 2&>1 if you want to pipe the output to a pager. My understanding is outputting help text to stderr is intentionally the default behavior for the flag package. (golang/go#17284, https://cs.opensource.google/go/go/+/refs/tags/go1.17.5:src/flag/flag.go;l=369;drc=refs%2Ftags%2Fgo1.17.5)
Since src is likely to be used by more non-Go developers compared to Go developers, would it make sense to consistently output the help text to stdout instead?
For
srcCLI, it looks like help text with--helpis output to either stderr or a mix of stdout and stderr.For example,
src --helpseems to output everything to stderr.src lsif upload --helpseems to output some text to stdout and some to stderr.In either case, you need an extra
2&>1if you want to pipe the output to a pager. My understanding is outputting help text to stderr is intentionally the default behavior for theflagpackage. (golang/go#17284, https://cs.opensource.google/go/go/+/refs/tags/go1.17.5:src/flag/flag.go;l=369;drc=refs%2Ftags%2Fgo1.17.5)Since
srcis likely to be used by more non-Go developers compared to Go developers, would it make sense to consistently output the help text to stdout instead?