Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* which: 3 distinct exit codes * Previously, bin/which would use exit code 0 (success) even if it failed to locate a command, making it more difficult to use in shell scripts * Follow GNU version and treat exit code 2 as internal error, 1 as partial-or-no-match, 0 as all-commands-matched * Follow OpenBSD version and print error to stderr for each command that does not match * Bump version * test1: "perl which" --> invalid usage due to no argument, exit(2) * test2: "perl which sh ls" --> sh and ls are both found on my system, exit(0) * test3: "perl which sh brash" --> sh is found and brash is not, exit(1) * previous commit didn't handle -a flag
- Loading branch information