Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Jan 2023 10:49:17 GMT
From:      Yoshihiro Takahashi <nyan@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 9c9e31b9ac7b - stable/12 - unzip: Document optional member list
Message-ID:  <202301221049.30MAnHCr072563@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by nyan:

URL: https://cgit.FreeBSD.org/src/commit/?id=9c9e31b9ac7ba6dd7078aeae5ec4b119c651efc9

commit 9c9e31b9ac7ba6dd7078aeae5ec4b119c651efc9
Author:     Yoshihiro Takahashi <nyan@FreeBSD.org>
AuthorDate: 2023-01-02 04:17:27 +0000
Commit:     Yoshihiro Takahashi <nyan@FreeBSD.org>
CommitDate: 2023-01-22 10:48:17 +0000

    unzip: Document optional member list
    
    Submitted by:   Pat Maddox (man page)
    PR:             267426
    
    (cherry picked from commit a1f28ec729f7491da8607e8eeaee1b0f547c60d0)
---
 usr.bin/unzip/unzip.1 | 8 +++++++-
 usr.bin/unzip/unzip.c | 5 +++--
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/usr.bin/unzip/unzip.1 b/usr.bin/unzip/unzip.1
index bb43abf43a85..82e2c3a60ea0 100644
--- a/usr.bin/unzip/unzip.1
+++ b/usr.bin/unzip/unzip.1
@@ -25,7 +25,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd September 25, 2021
+.Dd January 2, 2023
 .Dt UNZIP 1
 .Os
 .Sh NAME
@@ -38,6 +38,7 @@
 .Op Fl x Ar pattern
 .Op Fl P Ar password
 .Ar zipfile
+.Op Ar member ...
 .Sh DESCRIPTION
 .\" ...
 The following options are available:
@@ -120,6 +121,11 @@ mode changes the way in which additional arguments are parsed.
 Currently only
 .Xr zipinfo 1L
 mode 1 is supported, which lists the file names one per line.
+.It Ar [member ...]
+Optional list of members to extract from the zipfile.
+Can include patterns, e.g.
+.Ar 'memberdir/*'
+will extract all files and dirs below memberdir.
 .El
 .Pp
 Note that only one of
diff --git a/usr.bin/unzip/unzip.c b/usr.bin/unzip/unzip.c
index 0b564b0f08ec..78731555eadc 100644
--- a/usr.bin/unzip/unzip.c
+++ b/usr.bin/unzip/unzip.c
@@ -998,8 +998,9 @@ static void
 usage(void)
 {
 
-	fprintf(stderr, "Usage: unzip [-aCcfjLlnopqtuvyZ1] [-d dir] "
-		"[-x pattern] [-P password] zipfile\n");
+	fprintf(stderr,
+"Usage: unzip [-aCcfjLlnopqtuvyZ1] [-d dir] [-x pattern] [-P password] zipfile\n"
+"             [member ...]\n");
 	exit(EXIT_FAILURE);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202301221049.30MAnHCr072563>