Re: ftp less progress
On 02/17/15 09:07, Ted Unangst wrote: It's sometimes helpful to run ftp -o - http://somwhat/ for debugging purposes, but the progress bar gets in the way and makes it ugly. Even with -V to disable verbose, it still prints progress. Add -M (complement of -m) to always turn off progress. I'm always annoyed by the workarounds required to get the desired output from this program. Even if possibly not perfect, I'm sure this makes the situation better, so ok halex@. /Alexander Index: ftp.1 === RCS file: /cvs/src/usr.bin/ftp/ftp.1,v retrieving revision 1.96 diff -u -p -r1.96 ftp.1 --- ftp.1 31 Jan 2015 19:33:45 - 1.96 +++ ftp.1 17 Feb 2015 08:05:06 - @@ -38,7 +38,7 @@ .Nd Internet file transfer program .Sh SYNOPSIS .Nm ftp -.Op Fl 46AadEegimnptVv +.Op Fl 46AadEegiMmnptVv .Op Fl D Ar title .Op Fl k Ar seconds .Op Fl P Ar port @@ -181,6 +181,11 @@ transfer. By default, .Nm will send a byte every 60 seconds. +.It Fl M +Causes +.Nm +to never display the progress meter in cases where it would do +so by default. .It Fl m Causes .Nm Index: main.c === RCS file: /cvs/src/usr.bin/ftp/main.c,v retrieving revision 1.97 diff -u -p -r1.97 main.c --- main.c 9 Feb 2015 08:24:21 - 1.97 +++ main.c 17 Feb 2015 08:04:14 - @@ -202,7 +202,7 @@ main(volatile int argc, char *argv[]) httpuseragent = NULL; while ((ch = getopt(argc, argv, - 46AaCc:dD:Eegik:mno:pP:r:S:s:tU:vV)) != -1) { + 46AaCc:dD:Eegik:Mmno:pP:r:S:s:tU:vV)) != -1) { switch (ch) { case '4': family = PF_INET; @@ -267,6 +267,9 @@ main(volatile int argc, char *argv[]) optarg); usage(); } + break; + case 'M': + progress = 0; break; case 'm': progress = -1;
ftp less progress
It's sometimes helpful to run ftp -o - http://somwhat/ for debugging purposes, but the progress bar gets in the way and makes it ugly. Even with -V to disable verbose, it still prints progress. Add -M (complement of -m) to always turn off progress. Index: ftp.1 === RCS file: /cvs/src/usr.bin/ftp/ftp.1,v retrieving revision 1.96 diff -u -p -r1.96 ftp.1 --- ftp.1 31 Jan 2015 19:33:45 - 1.96 +++ ftp.1 17 Feb 2015 08:05:06 - @@ -38,7 +38,7 @@ .Nd Internet file transfer program .Sh SYNOPSIS .Nm ftp -.Op Fl 46AadEegimnptVv +.Op Fl 46AadEegiMmnptVv .Op Fl D Ar title .Op Fl k Ar seconds .Op Fl P Ar port @@ -181,6 +181,11 @@ transfer. By default, .Nm will send a byte every 60 seconds. +.It Fl M +Causes +.Nm +to never display the progress meter in cases where it would do +so by default. .It Fl m Causes .Nm Index: main.c === RCS file: /cvs/src/usr.bin/ftp/main.c,v retrieving revision 1.97 diff -u -p -r1.97 main.c --- main.c 9 Feb 2015 08:24:21 - 1.97 +++ main.c 17 Feb 2015 08:04:14 - @@ -202,7 +202,7 @@ main(volatile int argc, char *argv[]) httpuseragent = NULL; while ((ch = getopt(argc, argv, - 46AaCc:dD:Eegik:mno:pP:r:S:s:tU:vV)) != -1) { + 46AaCc:dD:Eegik:Mmno:pP:r:S:s:tU:vV)) != -1) { switch (ch) { case '4': family = PF_INET; @@ -267,6 +267,9 @@ main(volatile int argc, char *argv[]) optarg); usage(); } + break; + case 'M': + progress = 0; break; case 'm': progress = -1;
Re: ftp less progress
i like. ok by me fwiw. On 17 Feb 2015, at 6:07 pm, Ted Unangst t...@tedunangst.com wrote: It's sometimes helpful to run ftp -o - http://somwhat/ for debugging purposes, but the progress bar gets in the way and makes it ugly. Even with -V to disable verbose, it still prints progress. Add -M (complement of -m) to always turn off progress. Index: ftp.1 === RCS file: /cvs/src/usr.bin/ftp/ftp.1,v retrieving revision 1.96 diff -u -p -r1.96 ftp.1 --- ftp.1 31 Jan 2015 19:33:45 - 1.96 +++ ftp.1 17 Feb 2015 08:05:06 - @@ -38,7 +38,7 @@ .Nd Internet file transfer program .Sh SYNOPSIS .Nm ftp -.Op Fl 46AadEegimnptVv +.Op Fl 46AadEegiMmnptVv .Op Fl D Ar title .Op Fl k Ar seconds .Op Fl P Ar port @@ -181,6 +181,11 @@ transfer. By default, .Nm will send a byte every 60 seconds. +.It Fl M +Causes +.Nm +to never display the progress meter in cases where it would do +so by default. .It Fl m Causes .Nm Index: main.c === RCS file: /cvs/src/usr.bin/ftp/main.c,v retrieving revision 1.97 diff -u -p -r1.97 main.c --- main.c9 Feb 2015 08:24:21 - 1.97 +++ main.c17 Feb 2015 08:04:14 - @@ -202,7 +202,7 @@ main(volatile int argc, char *argv[]) httpuseragent = NULL; while ((ch = getopt(argc, argv, - 46AaCc:dD:Eegik:mno:pP:r:S:s:tU:vV)) != -1) { + 46AaCc:dD:Eegik:Mmno:pP:r:S:s:tU:vV)) != -1) { switch (ch) { case '4': family = PF_INET; @@ -267,6 +267,9 @@ main(volatile int argc, char *argv[]) optarg); usage(); } + break; + case 'M': + progress = 0; break; case 'm': progress = -1;