I just started a Rust implementation and I was looking for exit codes to return on error, and I saw that you are using codes from 1 to 4. Wouldn't it be better to normalize those codes, avoiding 1 and 2 as 1 is for general errors and 2 is for builtins incorrect usage (see https://www.gnu.org/software/bash/manual/bash.html#Exit-Status and http://tldp.org/LDP/abs/html/exitcodes.html).
I just started a Rust implementation and I was looking for exit codes to return on error, and I saw that you are using codes from 1 to 4. Wouldn't it be better to normalize those codes, avoiding 1 and 2 as 1 is for general errors and 2 is for builtins incorrect usage (see https://www.gnu.org/software/bash/manual/bash.html#Exit-Status and http://tldp.org/LDP/abs/html/exitcodes.html).