From 0e7c8bc45aeb196b763d8cdbfcc8a5d8db4ca377 Mon Sep 17 00:00:00 2001 From: Kyle Isom Date: Fri, 27 Nov 2020 21:07:31 -0800 Subject: [PATCH] Support specifying a URL on the command line. This change will visit the first URL passed in on the command line. --- src/main.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main.rs b/src/main.rs index b0dd7b3..8e30876 100644 --- a/src/main.rs +++ b/src/main.rs @@ -67,6 +67,10 @@ fn main() { .with_id("container"), ); + if args.len() > 1 { + goto_url(&mut siv, &args[1]); + } + // We can quit by pressing q siv.add_global_callback('q', |s| s.quit()); // pressing g prompt for an URL