From 8a2154fefaafe631905c12891c9c2587dadbc863 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 14 Apr 2016 22:47:40 +0200 Subject: download: Send an ANSI erase-in-line sequence in addition to CR. Partly fixes . Reported by Danny Milosavljevic . * guix/build/download.scm (progress-proc): Send an ANSI erase-in-line sequence. --- guix/build/download.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guix') diff --git a/guix/build/download.scm b/guix/build/download.scm index fb236d314a..3c8359b602 100644 --- a/guix/build/download.scm +++ b/guix/build/download.scm @@ -167,8 +167,8 @@ (define* (progress-proc file size (seconds->string elapsed) (progress-bar %) %))) ;; TODO: Make this adapt to the actual terminal width. + (display "\r\x1b[K" log-port) (display (string-pad-middle left right 80) log-port) - (display #\cr log-port) (flush-output-port log-port) (cont)))) (lambda (transferred cont) @@ -183,8 +183,8 @@ (define* (progress-proc file size (seconds->string elapsed) (byte-count->string transferred)))) ;; TODO: Make this adapt to the actual terminal width. + (display "\r\x1b[K" log-port) (display (string-pad-middle left right 80) log-port) - (display #\cr log-port) (flush-output-port log-port) (cont)))))))) -- cgit v1.2.3