• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..20-Jan-2022-

src/H20-Jan-2022-229158

.cargo-checksum.jsonH A D03-May-202289 11

Cargo.lockH A D20-Jan-2022860 3127

Cargo.tomlH A D20-Jan-20221 KiB3229

LICENSE.mdH A D20-Jan-20221.1 KiB2621

README.mdH A D20-Jan-20221,019 3728

changelog.mdH A D20-Jan-20221.6 KiB5226

README.md

1[![](http://meritbadge.herokuapp.com/open)](https://crates.io/crates/open)
2[![Build Status](https://travis-ci.org/Byron/open-rs.svg?branch=master)](https://travis-ci.org/Byron/open-rs)
3
4Use this library to open a path or URL using the program configured on the system. It is equivalent to running one of the following:
5
6```bash
7# OSX
8$ open <path-or-url>
9# Windows
10$ start <path-or-url>
11# Linux
12$ open <path-or-url> || xdg-open <path-or-url> || gnome-open <path-or-url> || kde-open <path-or-url>
13```
14
15# Usage
16
17Add this to your Cargo.toml
18```toml
19[dependencies]
20open = "1"
21```
22…and open something using…
23```Rust
24open::that("https://rust-lang.org");
25```
26
27…or, open something with an application of your choice
28```Rust
29open::with("https://rust-lang.org", "firefox");
30```
31
32Follow this link for the [massive API docs](http://byron.github.io/open-rs).
33
34# Credits
35
36The implementation is based on the respective functionality of [cargo](https://github.com/rust-lang/cargo), but was improved to allow some error handling.
37