diff options
author | Ludovic Courtès <ludo@gnu.org> | 2016-04-14 22:47:40 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2016-04-15 00:32:18 +0200 |
commit | 8a2154fefaafe631905c12891c9c2587dadbc863 (patch) | |
tree | c59bda2461f279953958624517ce7d0350dc4d67 /guix | |
parent | 63e8bb12a46fe6ff493e674fd7ccceb8729c6b47 (diff) | |
download | gnu-guix-8a2154fefaafe631905c12891c9c2587dadbc863.tar gnu-guix-8a2154fefaafe631905c12891c9c2587dadbc863.tar.gz |
download: Send an ANSI erase-in-line sequence in addition to CR.
Partly fixes <http://bugs.gnu.org/22536>.
Reported by Danny Milosavljevic <dannym@scratchpost.org>.
* guix/build/download.scm (progress-proc): Send an ANSI erase-in-line
sequence.
Diffstat (limited to 'guix')
-rw-r--r-- | guix/build/download.scm | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ used to shorten FILE for display." (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 @@ used to shorten FILE for display." (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)))))))) |