Use first argument as URI if none provided with --uri.
authorTom Adams <tom@holizz.com>
Tue, 7 Jul 2009 10:50:45 +0000 (11:50 +0100)
committerTom Adams <tom@holizz.com>
Sat, 11 Jul 2009 10:37:50 +0000 (11:37 +0100)
uzbl.c

diff --git a/uzbl.c b/uzbl.c
index 7cff70a..c82e7be 100644 (file)
--- a/uzbl.c
+++ b/uzbl.c
@@ -2701,6 +2701,8 @@ main (int argc, char* argv[]) {
     g_option_context_free(context);
 
     gchar *uri_override = (uzbl.state.uri ? g_strdup(uzbl.state.uri) : NULL);
+    if (argc > 1 && !uzbl.state.uri)
+        uri_override = g_strdup(argv[1]);
     gboolean verbose_override = uzbl.state.verbose;
 
     /* initialize hash table */