diff options
Diffstat (limited to '')
-rw-r--r-- | module/entry-points/text.scm | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/module/entry-points/text.scm b/module/entry-points/text.scm index a537b6ac..69bb1691 100644 --- a/module/entry-points/text.scm +++ b/module/entry-points/text.scm @@ -11,9 +11,11 @@ (file (value #t) (single-char #\f)) )) -(define (main opts) - (for-each (lambda (l) (display l) (newline)) - (flow-text - (with-input-from-port (open-input-port (option-ref opts 'file "-")) - (@ (ice-9 rdelim) read-string)) - #:width (or (string->number (option-ref opts 'width "")) 70)))) +(define (main args) + (define opts (getopt-long args options)) + + (for-each (lambda (l) (display l) (newline)) + (flow-text + (with-input-from-port (open-input-port (option-ref opts 'file "-")) + (@ (ice-9 rdelim) read-string)) + #:width (or (string->number (option-ref opts 'width "")) 70)))) |