Single binary for browsing
Some systems require a single binary for the BROWSER variable, and rather than muck about with shell scripts we have this small thing instead.
This commit is contained in:
parent
57c01b0dd4
commit
528d616777
2 changed files with 18 additions and 0 deletions
|
|
@ -8,6 +8,11 @@ homepage = "https://github.com/DeCarabas/fwd"
|
|||
repository = "https://github.com/DeCarabas/fwd"
|
||||
readme = "README.md"
|
||||
|
||||
[[bin]]
|
||||
name = "fwd-browse"
|
||||
test = false
|
||||
bench = false
|
||||
|
||||
[dependencies]
|
||||
anyhow = "1.0"
|
||||
bytes = "1"
|
||||
|
|
|
|||
13
src/bin/fwd-browse.rs
Normal file
13
src/bin/fwd-browse.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// TODO: An actual proper UI.
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() {
|
||||
let args: Vec<String> = std::env::args().collect();
|
||||
|
||||
if args.len() < 2 {
|
||||
eprintln!("Usage: fwd-browse <url>");
|
||||
std::process::exit(1);
|
||||
}
|
||||
|
||||
fwd::browse_url(&args[1]).await;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue