Skip to content

Commit

Permalink
better handle opening links with no active browser
Browse files Browse the repository at this point in the history
  • Loading branch information
femnad committed Jan 1, 2023
1 parent c32e335 commit eb6df89
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "leth"
version = "0.4.0"
version = "0.4.1"
authors = ["fcd <[email protected]>"]
edition = "2018"

Expand Down
6 changes: 4 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ extern crate structopt;
use std::collections::HashMap;
use std::io::Cursor;
use std::io::{self, Read};
use std::process::Command;
use std::process::{Command, Stdio};

use regex::Regex;
use skim::prelude::*;
Expand Down Expand Up @@ -62,7 +62,9 @@ pub fn main() {
let url = item.clone();
Command::new("firefox")
.arg(url.output().as_ref())
.output()
.stdout(Stdio::null())
.stderr(Stdio::null())
.spawn()
.unwrap();
}
}

0 comments on commit eb6df89

Please sign in to comment.