3 ms·
The OpenBSD version of true is also amazing: https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/usr.bin/true/true.c?rev=1.1&content-type=text/plain https:
by mrweasel 1y ago
The OpenBSD version of true is also amazing: https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/usr.bin/true/true.c?rev=1.1&content-type=text/plain https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/usr...
The GNU version of true/false is more interesting. All the logic is in true and false just redefined the EXIT_STATUS and imports all of true.c. https://github.com/coreutils/coreutils/blob/master/src/false.c https://github.com/coreutils/coreutils/blob/master/src/false...
- johnisgood 1y agoFor reference, here is true.c: https://github.com/coreutils/coreutils/blob/master/src/true.c https://github.com/coreutils/coreutils/blob/master/src/true.....
- AlecSchueler 1y agoSo basically they also introduced the complexity of respecting --help and --version.
- johnisgood 1y agoThey did, because it is written somewhere that all GNU programs must conform to having --help and --version. I forgot where I read it.
- 1718627440 1y agoThe GNU Coding Standard: https://www.gnu.org/prep/standards/standards.html#Command_002dLine-Interfaces https://www.gnu.org/prep/standards/standards.html#Command_00...