that
is yet another clone of which
, as the result of my attempt to accomplish something out of nothing.
The main function contains only a single line of code.
fn main() -> nothing::Probably<()> {
println!("{}", that::Args::parse().locate()?.display()).into()
}
Besides that, there is nothing apprpriate.
$ whatis that
that: nothing appropriate
$ cargo install that
``` that 0.1.1 locate the binary for a command
USAGE:
that
ARGS:
OPTIONS: -h, --help Print help information -V, --version Print version information ```
if the command is found in PATH, print the path and exit with 0
$ that cat
/usr/sbin/cat
$ echo $?
0
otherwise do nothing, exit with 1
$ that dog
$ echo $?
1