#open #xdg-open #start #launch

bin+lib open

Open a path or URL using the program configured on the system

16 stable releases

✓ Uses Rust 2018 edition

1.4.0 Mar 8, 2020
1.3.2 Aug 11, 2019
1.3.1 Jul 28, 2019
1.2.2 Aug 5, 2018
1.0.2 Feb 28, 2015

#169 in Filesystem

Download history 9543/week @ 2019-12-10 11199/week @ 2019-12-17 8775/week @ 2019-12-24 9118/week @ 2019-12-31 15824/week @ 2020-01-07 10736/week @ 2020-01-14 11284/week @ 2020-01-21 10819/week @ 2020-01-28 11519/week @ 2020-02-04 11620/week @ 2020-02-11 11265/week @ 2020-02-18 9662/week @ 2020-02-25 10996/week @ 2020-03-03 11229/week @ 2020-03-10 14039/week @ 2020-03-17 14897/week @ 2020-03-24

46,544 downloads per month
Used in 92 crates (61 directly)

MIT license

9KB
158 lines

Build Status

Use this library to open a path or URL using the program configured on the system. It is equivalent to running one of the following:

# OSX
$ open <path-or-url>
# Windows
$ start <path-or-url>
# Linux
$ open <path-or-url> || xdg-open <path-or-url> || gnome-open <path-or-url> || kde-open <path-or-url>

Usage

Add this to your Cargo.toml

[dependencies]
open = "1"

…and open something using…

open::that("https://rust-lang.org");

…or, open something with an application of your choice

open::with("https://rust-lang.org", "firefox");

Follow this link for the massive API docs.

Credits

The implementation is based on the respective functionality of cargo, but was improved to allow some error handling.

Dependencies

~26KB