-- Leo's gemini proxy

-- Connecting to typed-hole.org:1965...

-- Connected

-- Sending request

-- Meta line: 20 text/gemini

commit c3950b73b5ddb69d47f28aff9ed1a86db4296cf6

Author: Julien Blanchard <julien@typed-hole.org>

Date: Mon May 4 18:57:34 2020 +0200


Display URL passed in argument if any


diff --git a/src/main.rs b/src/main.rs

index 28c3e25..b336f9f 100644

--- a/src/main.rs

+++ b/src/main.rs

@@ -88,10 +88,17 @@ fn main() {

});

}


- // Visit start URL setting if provided

- match settings::start_url() {

- Some(url) => route_url(&gui, url),

- None => (),

+ // Use passed URL or settings start_url

+ let args: Vec<String> = env::args().collect();

+ match args.len() {

+ // no argument passed, check settings

+ 1 => {

+ if let Some(url) = settings::start_url() {

+ route_url(&gui, url)

+ }

+ }

+ // Use argument as initial URL

+ _ => route_url(&gui, args[1].to_string()),

}


gui.start();



---

Served by Pollux Gemini Server.

-- Response ended

-- Page fetched on Mon May 27 18:21:19 2024