Join GitHub today
cmd/go: go test -h output doesn't work with less #28087
What did you do?
I tried to read the
What did you expect to see?
What did you see instead?
The head of the doc is off screen, and pressing the
changed the title from
go test -h output doesn't work with less
cmd/go: go test -h output doesn't work with less
Oct 9, 2018
The correct command to view help for
Since it's a valid command, it prints to stdout and exits with zero exit code. So, you can do what you want:
As far as I know, this behavior is consistent with Unix-y tools.
If you wanted to read
I don't think
However, I agree that it's normal for usage text to be printed to stderr. A shorter version of what Dmitri suggested above, if you're on Bash, is
The issue I linked above would also fix your issue, I believe.