diff --git a/README.md b/README.md index 212441e..4571b62 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,29 @@ A Rust port of the `which` utility. Locates an executable in the user's path. +## Usage + +```toml +[dependencies] +which = "1.0" +``` + +```rust +extern crate which; + +use which::which; + +fn main() { + assert_eq!( + which("sh"), + Some("/bin/sh".into())); + + assert_eq!( + which("foobar"), + None); +} +``` + ## License Licensed under either of