Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
src/ | H | 03-May-2022 | - | 413 | 281 | |
.cargo-checksum.json | H A D | 03-May-2022 | 89 | 1 | 1 | |
.cargo_vcs_info.json | H A D | 01-Jan-1970 | 74 | 6 | 5 | |
Cargo.lock | H A D | 01-Jan-1970 | 1.1 KiB | 40 | 34 | |
Cargo.toml | H A D | 01-Jan-1970 | 1 KiB | 33 | 30 | |
Cargo.toml.orig-cargo | H A D | 29-Nov-1973 | 602 | 24 | 19 | |
LICENSE.md | H A D | 29-Nov-1973 | 1.1 KiB | 26 | 21 | |
README.md | H A D | 29-Nov-1973 | 1.1 KiB | 37 | 28 | |
changelog.md | H A D | 29-Nov-1973 | 27.4 KiB | 578 | 389 |
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