about summary refs log tree commit diff stats
path: root/src/main.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-11-27 15:44:42 +0100
committerbptato <nincsnevem662@gmail.com>2022-11-27 15:44:42 +0100
commit3a12afa7617f3ccecbbf6b5852da3d6382a412bb (patch)
tree7596ce7f667b9dabec6ec71c9bd05b9de67feb93 /src/main.nim
parente7f157c792f53cb084e8694ee608f00727432a3d (diff)
downloadchawan-3a12afa7617f3ccecbbf6b5852da3d6382a412bb.tar.gz
Fix some regressions, add loading progress bar
Diffstat (limited to 'src/main.nim')
-rw-r--r--src/main.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.nim b/src/main.nim
index 63c52947..ad978fa6 100644
--- a/src/main.nim
+++ b/src/main.nim
@@ -40,6 +40,7 @@ Options:
     -T, --type <type>           Specify content mime type
     -v, --version               Print version information
     -h, --help                  Print this page
+    -r, --run <script/file>     Run passed script or file
     --                          Interpret all following arguments as URLs"""
   if i == 0:
     echo s
@@ -90,6 +91,7 @@ while i < params.len:
     inc i
     if i < params.len:
       conf.startup = params[i]
+      conf.headless = true
       dump = true
     else:
       help(1)
@@ -102,7 +104,7 @@ while i < params.len:
       pages.add(param)
   inc i
 
-if pages.len == 0 and conf.startup == "":
+if pages.len == 0 and not conf.headless:
   if stdin.isatty:
     help(1)