Bugfix in read-bible.in: help message displayed w/o args

This commit is contained in:
Silas Vedder 2022-10-20 21:16:34 +02:00
parent 7c0796ea34
commit e0e48665f8

View File

@ -31,6 +31,8 @@ exec guile -e '(@ (read-bible) main)' -s "$0" "$@"
(define-syntax conf (define-syntax conf
(syntax-rules (else) (syntax-rules (else)
((_ (f e)... (else g)) (cond ((flag? f) e)... (else g))))) ((_ (f e)... (else g)) (cond ((flag? f) e)... (else g)))))
(if (< (length args) 2)
(help)
(with-bible (cadr args) (with-bible (cadr args)
(conf ("-h" (help)) (conf ("-h" (help))
("-v" (version)) ("-v" (version))
@ -38,4 +40,4 @@ exec guile -e '(@ (read-bible) main)' -s "$0" "$@"
(call-with-chapter (get "-b") (get "-c") (call-with-chapter (get "-b") (get "-c")
print-text) print-text)
(call-with-book (get "-b") print-text))) (call-with-book (get "-b") print-text)))
(else (help))))) (else (help))))))