Crate open_cmd

Source
Expand description

Generate commands for opening paths and URIs in the default system handler.

These methods return std::process::Command instances that can immediately be run to open the given target, or modified to provide different stdin/stdout/stderr streams.

This crate used https://dwheeler.com/essays/open-files-urls.html as a reference.

Enums§

Error
Errors that may occur when generating a Command.
PathOrURI
A local file path or a remote URI.

Constants§

BROWSER_ENV
The environment variable checked when opening in a web browser.
EDITOR_ENV
The environment variable checked when opening in a text editor.

Functions§

open
Open the target in the default system handler.
open_browser
Open the target in the web browser specified by BROWSER_ENV, or the system handler if not set.
open_editor
Open the target in the text editor specified by EDITOR_ENV, or the system handler if not set.

Type Aliases§

Result
Type alias for the most common results in this crate.