@drewdevault@gloopsies@phel Not entirely… hehe, pun intended🤭, true : https://pubs.opengroup.org/onlinepubs/9799919799/utilities/true.html "Whereas colon is required to accept, and do nothing with, any number of arguments, true is only required to accept, and discard, a first argument of "--". Passing any other argument(s) to true may cause its behavior to differ from that described in this standard"
Yes if you call it without arguments, but you called it with the --version flag, that changes what the program does, doesn't it? If you called `gcc --version 1.c` you wouldn't expect it to compile your program?
@phel@drewdevault Can you explain what's weird? I'm probably simplifying things here, but the program got passed an open file descriptor as stderr, it attempted writing into it, that call returned an error, the program aborted with a non-zero exit code, what is wrong with this?
It would be incorrect to return success if the write operation failed on --version.
If you want it to return true - just don't request the version or help.
If for some bizarre reason you want a version of true without flags that will tell you the license, you can just use GNU bash's true built-in.
>One common use for true is replacing another program with it to shim or mock it so that it disregards the command line and always exits successfully In that usage, you won't be passing --version or --help to true, let alone piping to /dev/full or somewhere else that will fail to write, so that is a non-issue.