Bug 901 - visual gauge in progress meter
Summary: visual gauge in progress meter
Status: CLOSED WONTFIX
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: scp (show other bugs)
Version: 3.8.1p1
Hardware: All Linux
: P2 enhancement
Assignee: OpenSSH Bugzilla mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-21 08:56 AEST by Pavel Kankovsky
Modified: 2008-07-22 12:07 AEST (History)
1 user (show)

See Also:


Attachments
the patch (1.50 KB, patch)
2004-07-21 08:57 AEST, Pavel Kankovsky
no flags Details | Diff
a better patch (1.53 KB, patch)
2005-02-25 04:03 AEDT, Pavel Kankovsky
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Kankovsky 2004-07-21 08:56:24 AEST
A few releases ago scp displayed a visual approximation of its progress. I liked
that feature and decided to reintroduce it (with a slightly different,
wget-like, appearance).

Extra bonus: this code behaves better on extremely narrow terminals than the
original (see the patch: the branch with strlcpy(buf, "\r", win_size) is
responsible for the improvement).
Comment 1 Pavel Kankovsky 2004-07-21 08:57:05 AEST
Created attachment 692 [details]
the patch
Comment 2 Ben Lindstrom 2004-07-21 09:59:05 AEST
I'd rather not see it back in.  The issue we had in the past was to have a visual gauge we had to hack off 
too much of where the file was being saved.  And I'd rather see as full as path as possible over the 
visual bar.
Comment 3 Pavel Kankovsky 2004-07-22 00:12:03 AEST
My implementation is very sophisticated:
1. the gauge is displayed only if the terminal is at least 68 chars wide (35 for
numbers, 13 for minimal gauge (*), 20 for filename), this makes at least 32
chars for the filename on a standard 80-chars-wide terminal
2. the gauge grows beyond its minimal length if and only if there is some free
space available
3. the gauge is hidden (and the space occupied by the gauge may be reused by the
filename) when the file is finished (100%)

(*) a space, two brackets and ten "indicators"
Comment 4 Pavel Kankovsky 2005-02-25 04:03:48 AEDT
Created attachment 836 [details]
a better patch

Just in case anyone is interested in this enhancement, here is a better patch
fixing a small aesthetical error.
Comment 5 Damien Miller 2008-06-12 17:24:56 AEST
We will be keeping the existing progress meter. Anyone who finds our too boring is welcome to use your patch :)
Comment 6 Damien Miller 2008-07-22 12:07:07 AEST
Mass update RESOLVED->CLOSED after release of openssh-5.1