diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-04-24 19:36:36 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-04-24 19:36:36 +0200 |
commit | 5961d083c46683bdd8cb5a45a0528b4b90bd6dd8 (patch) | |
tree | e408f89fdbc4525f9284249d119cbb1f49ec64d4 /module | |
parent | Add 'from' and 'to' flags to HTML. (diff) | |
download | calp-5961d083c46683bdd8cb5a45a0528b4b90bd6dd8.tar.gz calp-5961d083c46683bdd8cb5a45a0528b4b90bd6dd8.tar.xz |
Add option to disable everything.
Diffstat (limited to '')
-rwxr-xr-x | module/main.scm | 8 |
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)))) |