From nobody Mon Jan 02 04:20:35 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NljMl4tQFz2nmh3; Mon, 2 Jan 2023 04:20:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NljMl4NlCz3Cxy; Mon, 2 Jan 2023 04:20:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672633235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/1r1NHDzVqcddLTL16PQ6sds6BlItzxlgfIF8s4bqm4=; b=Icl90HpEmZNKR0iuohwJvxFz/RPXoE+VWti/Pi/TRABNQG0B5PisfjFDcI5b/Y4h0mGxhg rt9Gv2tw7o+n19XRZpZWoGBsv/fwCDH79rDC+EYWZBOHnGZEkrDUdjqMShHRen8nAEKJeU 5o0BbPmNq5r/XXF/FMV0VlzsoYOPeju0uFSErBUSz+YCxqFyGjlwGqSMmJYj0e8GUPMkX6 nobG88oo7De7pCFMOUrRKBgJWPzTQD68Zf9kIPYnuC8FRMFhF5hl8RsF6okyl5AGaGup8r Q4BeVTVDi0C6kFSd4L5fvkXuHMPxBzfaA+XgqbV0XbYHTiKTP0ZroaCLcD+xkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1672633235; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/1r1NHDzVqcddLTL16PQ6sds6BlItzxlgfIF8s4bqm4=; b=Tr8/gtpYW+D4fcO8GXiCQVy36K9b47wDo3gCAKW2ftT4FizigC6kaosLg8y4M9Wjr9PnmW //8iIpt6pQMRvb0BM0CCjRIMxnVSJgvYttQoVp2lpODO4m5UAexKwNVKBUYvga34Sjq+LU OhZntyipYvVXLcAz+CvaNQwK+UUdyud+zx/2wVHTPjKQasUii51WykBfZKfpoFmB0SsX+t 4jDKwxTI+kGGLHa5R4KzJnA3n0rHp6IpBMT8PC4KLrDQeJJb3Y/z42z/xCCwxScZwpA0fH B5ILQUfEXXgZGPRYiDyZ5gQhYNvBOctYPIam4OQqJVoOZGcw6piPFg5D3T5YHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1672633235; a=rsa-sha256; cv=none; b=RIA/omZgz3r+bcBVjEesiGFjwcsp/EzpLcCE9gnyK90ilILLKWTdrldUHSV8Poemraf/zK 0P8rJ8idXjG8v3bATXHcWb0c+jId4Lh7NraaxYGRFh1ZEdNLQZ8NyJO2tyZVvWbR7m4BbG deiphVvZwRKehoM8bUnQYlMojx1b80WKTrcb9LXCekwMxkM9UPicCRdO3+BzxnVVtv/09H cXlAuutAknlI0XO4VbQKV0hvRmKXY8NBt9JFkyxIlweRue9dI6CuLYk+xOmzZG3nXG6tQZ ZqucwCXErqptDp1MCrSFUU2ywQht0mBPyQfh+0i8YmJw/JKuQuHt5KEFmOtcvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NljMl3RszzttH; Mon, 2 Jan 2023 04:20:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 3024KZVf000206; Mon, 2 Jan 2023 04:20:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 3024KZXp000205; Mon, 2 Jan 2023 04:20:35 GMT (envelope-from git) Date: Mon, 2 Jan 2023 04:20:35 GMT Message-Id: <202301020420.3024KZXp000205@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yoshihiro Takahashi Subject: git: a1f28ec729f7 - main - unzip: Document optional member list List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: nyan X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a1f28ec729f7491da8607e8eeaee1b0f547c60d0 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by nyan: URL: https://cgit.FreeBSD.org/src/commit/?id=a1f28ec729f7491da8607e8eeaee1b0f547c60d0 commit a1f28ec729f7491da8607e8eeaee1b0f547c60d0 Author: Yoshihiro Takahashi AuthorDate: 2023-01-02 04:17:27 +0000 Commit: Yoshihiro Takahashi CommitDate: 2023-01-02 04:17:27 +0000 unzip: Document optional member list Submitted by: Pat Maddox (man page) PR: 267426 MFC after: 2 weeks --- 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); }