3 ms·
In fact, there's a system already in place, it's just that almost no one uses it and there's no codified convention. Error code 22 is EINVAL, "invalid argument
by ZoomZoomZoom 2y ago
In fact, there's a system already in place, it's just that almost no one uses it and there's no codified convention.
Error code 22 is EINVAL, "invalid argument". If most of the CLI frameworks agreed to use it on invalid commands, shells could diferrentiate user errors and program errors and keep histories clean.
Adding this to POSIX Utility Conventions and GNU Coding Standards would be a great kickstart.
https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/basedefs/V1_chap12.html https://pubs.opengroup.org/onlinepubs/9699919799.2018edition...
https://www.gnu.org/prep/standards/html_node/index.html#Top https://www.gnu.org/prep/standards/html_node/index.html#Top