]> pd.if.org Git - zpackage/commitdiff
accept -p for progress bar
authorNathan Wagner <nw@hydaspes.if.org>
Sat, 16 Feb 2019 16:04:14 +0000 (16:04 +0000)
committerNathan Wagner <nw@hydaspes.if.org>
Sat, 16 Feb 2019 16:04:14 +0000 (16:04 +0000)
doc/zpm-fetchurl.8
src/fetchurl.c

index 8f9385990083b276214df5642fe636be0c6ea68b..d3948df3290e0e3a526d01eb1a961e53d0e488df 100644 (file)
@@ -4,7 +4,7 @@ zpm-fetchurl \- download files
 .SH SYNOPSIS
 .B zpm fetchurl
 [
-.B -ISkKrOn
+.B -ISkKrOnp
 ]
 [
 .BI -o file
@@ -60,8 +60,8 @@ Only if newer.  Like \-z, except use the output file name, if any.
 .B \-f
 Fail silently on errors.
 .TP
-.B \-#
-Output a progress bar.
+.B \-p \-#
+Output a progress bar.  A '#' is accepted for compatibility with curl.
 .SH EXAMPLES
 .TP
 zpm fetchurl -o zpm-0.1.2.zpm https://zoranix.net/repo/packages/zpm-0.1.2.zpm
index 395ce9573f5f444c61c1c2a66860e639864d12eb..2f144d6dba72b72638a5aca6573fd13836845d68 100644 (file)
@@ -587,7 +587,7 @@ int main(int ac, char *av[]) {
 
        ltc_mp = tfm_desc;
 
-       while ((option = getopt(ac, av, "o:OrIfz:n#R:SkK")) != -1) {
+       while ((option = getopt(ac, av, "o:OrIfz:np#R:SkK")) != -1) {
                switch (option) {
                        case 'o': outfile = optarg; break;
                        case 'O': calcoutfile = 1; break;
@@ -600,6 +600,7 @@ int main(int ac, char *av[]) {
                        case 'z': lmfile = optarg; break;
                        case 'n': ifnewer = 1; break;
                        case 'R': redirlimit = strtol(optarg, 0, 10); break;
+                       case 'p':
                        case '#': progressbar = 1; break;
                        default:
                                  exit(EXIT_FAILURE);