3 ms·
The main arg parser for Rust (clap) was looking at using sysexits for usage but then got feedback from burntsushi (of ripgrep fame) for how rarely it is used an
by epage 5y ago
The main arg parser for Rust (clap) was looking at using sysexits for usage but then got feedback from burntsushi (of ripgrep fame) for how rarely it is used and instead encouraged 2. In looking at it, it seems like 2 is the most consistent code and for clap v3 will be using it.
- 2 is "misuse of shell built-ins" for bash [1]
- Python's argparse uses 2 [2]
I feel like we looked at more but can't remember which all they were
[0] https://github.com/clap-rs/clap/pull/1637#issuecomment-581032396 https://github.com/clap-rs/clap/pull/1637#issuecomment-58103...
[1] https://tldp.org/LDP/abs/html/exitcodes.html https://tldp.org/LDP/abs/html/exitcodes.html
[2] https://github.com/python/cpython/blob/main/Lib/argparse.py#L2580 https://github.com/python/cpython/blob/main/Lib/argparse.py#...