summaryrefslogtreecommitdiff
path: root/guix/progress.scm
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2017-12-19 01:42:40 +0100
committerMarius Bakke <mbakke@fastmail.com>2017-12-19 01:42:40 +0100
commit32cd878be0bb7e153fcaa6f3bfa2632867390ff9 (patch)
treefc1ff93949817c9d172c84d0410ac9225cad57ae /guix/progress.scm
parent753425610274ccb59cce13490c096027c61621d0 (diff)
parent98bd11cfe7b931e9c6d6bf002a8a225fb7a1025b (diff)
downloadguix-patches-32cd878be0bb7e153fcaa6f3bfa2632867390ff9.tar
guix-patches-32cd878be0bb7e153fcaa6f3bfa2632867390ff9.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'guix/progress.scm')
-rw-r--r--guix/progress.scm12
1 files changed, 6 insertions, 6 deletions
diff --git a/guix/progress.scm b/guix/progress.scm
index 0ca5c08782..c9c3cd12a0 100644
--- a/guix/progress.scm
+++ b/guix/progress.scm
@@ -178,8 +178,8 @@ width of the bar is BAR-WIDTH."
(make-string filled #\#)
(make-string empty #\space))))
-(define (erase-in-line port)
- "Write an ANSI erase-in-line sequence to PORT to erase the whole line and
+(define (erase-current-line port)
+ "Write an ANSI erase-current-line sequence to PORT to erase the whole line and
move the cursor to the beginning of the line."
(display "\r\x1b[K" port))
@@ -206,7 +206,7 @@ ABBREVIATION used to shorten FILE for display."
(byte-count->string throughput)
(seconds->string elapsed)
(progress-bar %) %)))
- (erase-in-line log-port)
+ (erase-current-line log-port)
(display (string-pad-middle left right
(current-terminal-columns))
log-port)
@@ -218,7 +218,7 @@ ABBREVIATION used to shorten FILE for display."
(byte-count->string throughput)
(seconds->string elapsed)
(byte-count->string transferred))))
- (erase-in-line log-port)
+ (erase-current-line log-port)
(display (string-pad-middle left right
(current-terminal-columns))
log-port)
@@ -248,7 +248,7 @@ tasks is performed. Write PREFIX at the beginning of the line."
(set! done (+ 1 done))
(unless (> done total)
(let* ((ratio (* 100. (/ done total))))
- (erase-in-line port)
+ (erase-current-line port)
(if (string-null? prefix)
(display (progress-bar ratio (current-terminal-columns)) port)
(let ((width (- (current-terminal-columns)
@@ -263,7 +263,7 @@ tasks is performed. Write PREFIX at the beginning of the line."
(set! done 0)))
(report report-progress)
(stop (lambda ()
- (erase-in-line port)
+ (erase-current-line port)
(unless (string-null? prefix)
(display prefix port)
(newline port))