From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 26927 invoked from network); 3 Aug 2021 17:36:23 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 3 Aug 2021 17:36:23 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1628012183; b=V5DG8FZLZlrjk+l3wo4/VKMLzrt9k4oIYc5oY/Hmo+VLL+Oe1beycM425OT369Y2KSNLSxP7pT bHdCoCHW+w6cDsEUwAy6PnkdfsBGU9qizdQOsxrQ+Tgr10PF85D7KVl8kYeHYD+UHcW9pAJVDF rfbFYF5haN6qMf2RfcKtZz1TiqwjhOOBkwUSVbfSiqqKqvn5B+WUOmCWPpSLIEDaxwf4gud9wd mueIDTVl2IuRSp4BDpl+jvxXMh9UCPb1jZB1UIVjqUOYSqzjlH9qCrhiO9DchINr9m84luHjYX b2FDdJo8ffCmvb8uV0SSf+WllMVz2hR90BGizdehmzt4Pw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ed1-f48.google.com) smtp.remote-ip=209.85.208.48; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1628012183; bh=JyuniPx4TrOvrIFqQevwXJubLfa0UwfMmi2QXClYOcs=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version: Message-ID:Date:References:In-Reply-To:Subject:To:From:DKIM-Signature: DKIM-Signature; b=ePkOy8IYniiVnvMB6zjrbE0kPsqmb0rbkTi6TUkJVU+NG3JcLxNn3OgJYzAc7M01MkJMmsGjgH qnMK32FOdzi+mXt2v3UER8cSkYnSq4gXaAs3OBy5v8QjnOy5bpjO92Z0AKGAJ9+pMjHFx82gpi 6BIA1vSoD+HWOcduUlPD6gJqg5VO8DvMbT05NWwS7That1yv13GctLSi+cZdILXJYIWdoRptN3 1y/3ASPgNSF9idDFZXrePC0IZXeUWisKt6n9pPuxyHK1KgQgeF3Ubd+wqpFvAj14CDbi6p2Zfo lHOZoHPLabRo9h9nKaD9pWHEqemnIpaXW8okhp+dpA5IgA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To:Subject:To: From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=EsumY/rdiA+1XI5QBAaQAcBXLtbFIjsVHO+dNSUw8H8=; b=o4R5l5joImQIexYyeQ0S1G3UW8 J51YoLodWSQF1AUtZzQJ9qAoCWvf6PQLLsJtJsSgn2Yzq02Tzq7sUjBqH8aait9G3e4jeEUkWC5Rj MdtLbylwdYah3KLXW+dGZKZYUxfWDO5trpB4VFJDCYsngDuCg8W2nkZmb+o+Tb5t41163TH5eUNfL SebwKl4hcnW08UqMJMUvfiyjtGObGyNx2aT3hTLVhieA0RHKBO3yIWsaCVhzbpAZPnnOC9BVrcfwu kLGOWbJ8tKdGgQAy7AwOCdbfDhWzl6cJ44AtuXwCIVpXVW5YKdGqym80WGeIrAzOOupltLp5Nnqip P4+fqXfw==; Received: from authenticated user by zero.zsh.org with local id 1mAyL0-0009s8-Jf; Tue, 03 Aug 2021 17:36:22 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ed1-f48.google.com) smtp.remote-ip=209.85.208.48; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ed1-f48.google.com ([209.85.208.48]:34573) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1mAyKg-0009Xh-OJ; Tue, 03 Aug 2021 17:36:04 +0000 Received: by mail-ed1-f48.google.com with SMTP id i6so140729edu.1 for ; Tue, 03 Aug 2021 10:36:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:user-agent:date:message-id :mime-version:content-transfer-encoding; bh=EsumY/rdiA+1XI5QBAaQAcBXLtbFIjsVHO+dNSUw8H8=; b=s/DjkH7A5soguZTL8X4M7QeMD6iZewVoCfjt/owGVFmHzUp9CgHalWYdvGK2ZkNSHR A2Ua+NpcYoDkHoW5GYFIYIXWH9YYmxXAZ9GSr82YLDR9ZvXwYcj51zZ2swL60BUybDel Tg240Wig5RgvxDhxGGOnYIsn1Z37hBB3XKgrWOCZBCJ8pKjo3E40panTvQmlzrAVHKql beNaWxdvB+/u0e0ACvfVgatZ9WUL8CxdL/lBTjUp59Kq2P+FUeo9dFVBvR9wUcCw8MLD PsSYSsbRVpyj+WILBM3U5BvuvjI2dBcY9q7krnTMCDwaruH2cNJNds2bSvAZulr2AEtE I1FQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references :user-agent:date:message-id:mime-version:content-transfer-encoding; bh=EsumY/rdiA+1XI5QBAaQAcBXLtbFIjsVHO+dNSUw8H8=; b=Fod6IlHkNgamArjnRppOOR4iXPOSd1U1hMsSN3SbNxVeKEB2BYEkMmF6rM4J+nj6/o EqulD24IHUOybOoZZmQYsoqfLd52bsyUCVp6XUrAfmvAChvlODD/7kkT/lPNDe9q5Vkx 7FP8sihmhLZqzzalEKusrJ0os1wYiNFeoPTeriJ8BHAbDDnShc2STlp0ZGej4oJ5xO1B tEWLWwrDM96jtAb6JKyBPuUNOG/FY2H9+yjqANCuI37FT95POvIBkCIAZSIArftC5U00 nDT+CD2aFAH5H0JwRmGAS8HbxLVVO3jVdECpwvFgLZxA5U/vy4dL9t0tOU43310+OuvN FalA== X-Gm-Message-State: AOAM530QeenAvf9pUdpIkWFRvwG2Sqp86shueQXeufDPbad7A/5Tt0TC qkPgsrNS8plShd+bq8QS0s2bJxjt0Pw= X-Google-Smtp-Source: ABdhPJz//ZiezDzw/ZLsP27G3AV32ZZkp4phwD473IY1chOjn3lojbCCdd2JVemYCWz+1AnCbEbSUg== X-Received: by 2002:a05:6402:4412:: with SMTP id y18mr26732483eda.1.1628012161928; Tue, 03 Aug 2021 10:36:01 -0700 (PDT) Received: from localhost (dynamic-109-81-211-243.ipv4.broadband.iol.cz. [109.81.211.243]) by smtp.gmail.com with ESMTPSA id w5sm6590274ejz.25.2021.08.03.10.36.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Aug 2021 10:36:01 -0700 (PDT) From: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= To: zsh-workers@zsh.org Subject: [PATCH v2] _python: add missing options In-Reply-To: (Matthew Martin's message of "Tue, 27 Jul 2021 22:42:13 -0500") References: <20210726221050.764873-1-stepnem@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Date: Tue, 03 Aug 2021 19:36:05 +0200 Message-ID: <20210803193605+0200.308209-stepnem@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Seq: 49234 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: --- The only difference from v1 is addition of the 'mode' argument completion to the --check-hash-based-pycs option. Response to Matthew's comments follows inline. On Tue, 27 Jul 2021 22:42:13 -0500 Matthew Martin wrote: > On Tue, Jul 27, 2021 at 12:10:50AM +0200, =C5=A0t=C4=9Bp=C3=A1n N=C4=9Bme= c wrote: >> diff --git a/Completion/Unix/Command/_python b/Completion/Unix/Command/_= python >> index f10106f9b4d9..05d26f2e7652 100644 >> --- a/Completion/Unix/Command/_python >> +++ b/Completion/Unix/Command/_python >> @@ -11,7 +11,9 @@ if _pick_variant python3=3DPython\ 3 python2 --version= ; then >> args=3D( >> '(-bb)-b[issue warnings about str(bytes_instance), str(bytearray_in= stance) and comparing bytes/bytearray with str]' >> '(-b)-bb[issue errors about str(bytes_instance), str(bytearray_inst= ance) and comparing bytes/bytearray with str]' >> + '--check-hash-based-pycs[configure how Python evaluates up-to-daten= ess of hash-based .pyc files]:mode' > > Should probably offer the allowed modes here > '--check-hash-based-pycs[configure how Python evaluates up-to-datenes= s of hash-based .pyc files]:mode:(default always never)' Now added. >> @@ -37,7 +39,8 @@ _arguments -C -s -S "$args[@]" \ >> "-s[don't add user site directory to sys.path]" \ >> "-S[don't imply 'import site' on initialization]" \ >> '-u[unbuffered binary stdout and stderr]' \ >> - '-v[verbose (trace import statements)]' \ >> + '(-vv)-v[trace module initialization and cleanup]' \ >> + '(-v)-vv[in addition to -v, trace all files checked when searching fo= r a module]' \ > > --help only mentions "can be supplied multiple times to increase > verbosity" not what each count does. I'm not sure we should be more > specific than the --help output. Changing the spec to *-v may suffice. Manual pages of both Python major versions as well as the online docs [1] are quite explicit about the function and number of repetitions [2] of the -v option, so I still believe being explicit in the completion as well is more correct and helpful. Thank you. [1] https://docs.python.org/3/using/cmdline.html#id4 [2] Also confirmed by a simple test: % python -v 2>&1 &1 &1 &1