From 5961d083c46683bdd8cb5a45a0528b4b90bd6dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 24 Apr 2019 19:36:36 +0200 Subject: Add option to disable everything. --- module/main.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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)))) -- cgit v1.2.3