News for hackers. Stuff that matters.
Re:"Rules" that terminal programs follow by matheusmoreira on Thursday December 12, 2024 @04:11PM (#42403376)
> because the user specified a `-v` flag or whatever

The way I see it is the version information and help text belong on standard output if the user passes --version and --help since that's what the user explicitly asked for. When the command is invoked incorrectly, the help text should go to standard error while standard output should be empty.

I agree about the exit code. People like to parse error messages and that's always wrong. Everything should be done via exit codes instead.

Re:"Rules" that terminal programs follow by packetlost on Thursday December 12, 2024 @04:56PM (#42403826)
The `-v` was in reference to the common convention of one or more `v` flags increasing the verbosity of logging.