GithubHelp home page GithubHelp logo

x0f5c3 / open-rs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from byron/open-rs

0.0 0.0 0.0 677 KB

Open a path or URL with the system-defined program

Home Page: http://byron.github.io/open-rs

License: MIT License

Rust 100.00%

open-rs's Introduction

Crates.io cross-platform-testing

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
$ xdg-open <path-or-url> || gio open <path-or-url> || gnome-open <path-or-url> || kde-open <path-or-url> || wslview <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.

open-rs's People

Contributors

byron avatar hybras avatar apogeeoak avatar ignatenkobrain avatar boundless-forest avatar timvisee avatar heyimalex avatar mandx avatar city-busz avatar seeker14491 avatar vladimyr avatar drhyde avatar therustmonk avatar skade avatar hoodie avatar mre avatar reiner-dolp avatar tshepang avatar rhysd avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.