diff --git a/Cargo.toml b/Cargo.toml index 9a0b543..b3d5a45 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "open" -version = "1.3.5-alpha.0" +version = "1.4.0" authors = ["Sebastian Thiel "] license = "MIT" edition = "2018" diff --git a/README.md b/README.md index 5c40e3a..be63a99 100644 --- a/README.md +++ b/README.md @@ -17,14 +17,14 @@ $ open || xdg-open || gnome-open || kd Add this to your Cargo.toml ```toml [dependencies] -open = "*" +open = "1" ``` -... and open something using +…and open something using… ```Rust open::that("https://rust-lang.org"); ``` -or, open with something app +…or, open something with an application of your choice ```Rust open::with("https://rust-lang.org", "firefox"); ``` diff --git a/changelog.md b/changelog.md index 9f3e1f2..a775c58 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,7 @@ - +## v1.4.0 (2020-03-08) + +* add `open::with(path, app)` and `open::with_in_background(…)` + ## v1.3.4 (2020-02-11) * Add LICENSE.md and README.md into the crates.io tarball. diff --git a/src/lib.rs b/src/lib.rs index 77fd175..d3d5424 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -12,6 +12,15 @@ //! open::that("http://rust-lang.org").unwrap(); //! # } //! ``` +//! Alternatively, specify the program to open something with. It should expect to receive the path or URL as first argument. +//! ```test_harness,no_run +//! extern crate open; +//! +//! # #[test] +//! # fn doit() { +//! open::with("http://rust-lang.org", "firefox").unwrap(); +//! # } +//! ``` //! //! # Notes //!