From 2828dbcf69fdf5e07ef24cab079ba8e49f7a4791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 1 Oct 2019 16:05:20 +0200 Subject: Add --width flag to format. --- module/main.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'module/main.scm') diff --git a/module/main.scm b/module/main.scm index 4e75bbf9..59b74b1b 100755 --- a/module/main.scm +++ b/module/main.scm @@ -65,6 +65,7 @@ exec guile -e main -s $0 "$@" (file (value #t) (single-char #\f)) (output (value #t) (single-char #\o)) (format (value #f)) + (width (value #t) (single-char #\w)) (statprof (value optional)))) (define (ornull a b) @@ -84,7 +85,8 @@ exec guile -e main -s $0 "$@" (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)))) + (@ (ice-9 rdelim) read-string)) + #:width (or (string->number (option-ref opts 'width "")) 70))) (init (lambda (c e) -- cgit v1.2.3