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

..03-May-2022-

src/H03-May-2022-413281

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

.cargo_vcs_info.jsonH A D01-Jan-197074 65

Cargo.lockH A D01-Jan-19701.1 KiB4034

Cargo.tomlH A D01-Jan-19701 KiB3330

Cargo.toml.orig-cargoH A D29-Nov-1973602 2419

LICENSE.mdH A D29-Nov-19731.1 KiB2621

README.mdH A D29-Nov-19731.1 KiB3728

changelog.mdH A D29-Nov-197327.4 KiB578389

README.md

1[![Crates.io](https://img.shields.io/crates/v/open.svg)](https://crates.io/crates/open)
2[![cross-platform-testing](https://github.com/Byron/open-rs/workflows/cross-platform-testing/badge.svg)](https://github.com/Byron/open-rs/actions?query=workflow%3Across-platform-testing)
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$ xdg-open <path-or-url> || gio open <path-or-url> || gnome-open <path-or-url> || kde-open <path-or-url> || wslview <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