aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2019-04-24 19:36:36 +0200
committerHugo Hörnquist <hugo@hornquist.se>2019-04-24 19:36:36 +0200
commit5961d083c46683bdd8cb5a45a0528b4b90bd6dd8 (patch)
treee408f89fdbc4525f9284249d119cbb1f49ec64d4
parentAdd 'from' and 'to' flags to HTML. (diff)
downloadcalp-5961d083c46683bdd8cb5a45a0528b4b90bd6dd8.tar.gz
calp-5961d083c46683bdd8cb5a45a0528b4b90bd6dd8.tar.xz
Add option to disable everything.
-rwxr-xr-xmodule/main.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/module/main.scm b/module/main.scm
index d0ddac48..620e64fd 100755
--- a/module/main.scm
+++ b/module/main.scm
@@ -46,12 +46,18 @@
(define options
'((mode (value #t) (single-char #\m))))
+(define (ornull a b)
+ (if (null? a)
+ b a))
+
(define (main args)
(let ((opts (getopt-long args options #:stop-at-first-non-option #t)))
(init
(lambda (c e)
- (let ((ropt (option-ref opts '() '("term"))))
+ (let ((ropt (ornull (option-ref opts '() '())
+ '("term"))))
((case (string->symbol (car ropt))
+ ((none) (compose display list))
((html) html-main)
((term) terminal-main))
c e ropt))))