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 19836 invoked from network); 7 Mar 2021 21:57:47 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 7 Mar 2021 21:57:47 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1615154267; b=f3N+7atLF3hPgNAB4Xn+qVvCA7Bh+BblR2QUyp2x1FOJCYYrb0ZX8U+YAc1Qt20oHHLLw2kmXr 9MwZdmOp9fyqFK/hejnhtDfPb5d6sYay42y88bVCGsfNnjeUonMZJkx4Hf7uqTXgjfFezzsimZ SE6foAYHQGK+Lxx7AWQgTs5sBGmlEjme/P36ukUbIP/TULEfU1DPGhbc6xo0IqAouyNPUNqfTC 8AOF6M2tNWtaCnLy+AeAqQDxwNo8e4FSrswGnGkKUjFQ7qj4xjQxcAog6AEP18TNdOdzdjyRGH Br3QVuFz5K05fdQPSWgonLuapdmQAGyr24m0eOmYXgQxKQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-ot1-f52.google.com) smtp.remote-ip=209.85.210.52; 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=1615154267; bh=jlHMNVJSZRh6BZFN0iZ3fxbo1iyqqran8t0AyWKS3RE=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:To:References:Message-ID:Content-Transfer-Encoding:Cc:Date: In-Reply-To:From:Subject:MIME-Version:Content-Type:DKIM-Signature: DKIM-Signature; b=BRxU9exbsKjyEIRvWRphIbD8LUOlAIct82LZHTth0mjh2I8zpsQPHk8kVMGu9ApBgwW+bWRuQF n0IJfgIp6iOcHyBpgMlb+mxfoqbJWxJ3Df8Lfakam3oiq7+Xd83whd3pfYIefJbTGPajsLI+5H ynZO0SoxXff0w6MB/rHorlY2EPuV6KGbrR0sOU20MOFAf7a3IJ2SletMvJ5uJRh8Nhrly7aOyY dJ10oyUFEq6rHIaZusf/IXsLw7AlJH2THYlxM/hj0Hhk+/YPJ+SbMd9XmQ2Qy/dwSZpHrSxAxb oQrG/cgzeus7EkrISe24901Q4VCsOUbWAWaKwz3OoDZgcQ==; 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:To:References:Message-Id: Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version: Content-Type:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=thi1kaIv2YmPcCPrmW2IP8kqDkDjmeexYWbOrkbQsls=; b=Ks2WRd1qET0qYFF7qAhE1CcoIV cod3Pma/jI2gb0Iy50U9DBz6+IzmU4H841zAda0GSNIE1FpbXekNgB/8Hhh+rWGV/g93tzvm7i+Kg 3SKhh9OEVoybUWuXCNRIVwcKXD0cVDwOIbk3BShYGlK9PPhtkCbKnUsr4BAabRkOX+POO51oyCLGw 3FU56oRrWC0azmTqRbTOY3PhB5NTge/+ucA5b/mGDvCO5tcWz3TrlMFgb9XCqOs8Pe1bx+b7JDtHN ZzUOmT+DdkOEUj9rvEiRUUT5jsFSgcITThyqvDIP1g75tyAMLduTFm9UcEpxoY7tXJj9WxNEQT7x/ uGS9Vmyw==; Received: from authenticated user by zero.zsh.org with local id 1lJ1PH-0001I9-O5; Sun, 07 Mar 2021 21:57:47 +0000 Authentication-Results: zsh.org; iprev=pass (mail-ot1-f52.google.com) smtp.remote-ip=209.85.210.52; dkim=pass header.d=gmail.com header.s=20161025 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-ot1-f52.google.com ([209.85.210.52]:42808) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1lJ1P2-0000yR-1X; Sun, 07 Mar 2021 21:57:32 +0000 Received: by mail-ot1-f52.google.com with SMTP id e45so7365518ote.9 for ; Sun, 07 Mar 2021 13:57:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=thi1kaIv2YmPcCPrmW2IP8kqDkDjmeexYWbOrkbQsls=; b=V31a5cScmOLu8Pl1K6m5KqKWW3R0VMEaYg9+KilWOxCQoBNoUmpkjj1jP/K6jn8wyw KZfh4Tn0sxtEKTHzlblYxePv/5/Vso52Zk7czmvmoHahaRF+JDblATGXI54sSribv0BT IB+IXh0mDfNuEcLbd8o6AATrtV0H+7JsyINQXKTA16ua6hw/j98+9i71eRWda+Zsp/cu qmZAJ0Co28NalDYpbmNOz6mS4GMCIOmj0RM4joHkgyKKfnPi5Tdcfqiouu68dsFunsfa fK8Ve6BkbGTd1fHuK7HrlaSMuOElp6SvM7MAZ/SSvH2nu2Yc16CEjZx8IFsW8JCnsKnx 6bcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=thi1kaIv2YmPcCPrmW2IP8kqDkDjmeexYWbOrkbQsls=; b=tvW3/PzsK/3OsipaaiScsHbbYRu5ioo4FhDRSSrroVNa9wcL0kqJ7wla9axLRIP2hn 4QSAVHu9FuPmwte03vQSYxLf1G1gNSsJhZbgdeJO837/+I6zHWCC0IPeGKqqGGV1xQ66 JWu6JkFeLaLlyRojFABLDRfGLMplSxqJ3559+/r28f6ibwte9LE2upwYIkpaNCQkZBrg Xebz4lGMK5uY/1Ae7dB4G5zuCmeW3dcKWO6vdx2cSMwowI8axrG56mVvdQTncbbWU874 ZkuuqzWIcObSzIQP4afn6Rlm6qCeKxQEEcQKnLRy10eo9eNDHiP1+coYS/bcliIpbjmU /9NA== X-Gm-Message-State: AOAM533dUatd+vtswmj+bcpA8cKzRQXnuTsMk8mi98jtNW2GLSgcEgo3 02YD4e+Z5/idaB+BHvSJE3hdQ8rLU8s= X-Google-Smtp-Source: ABdhPJwvAlxfL0i6AFY2LQNg8LlCmkUDlgFWp6RWVP+kemPvccQ4gSpQvGSwN7O1uvWaE9qyONixvA== X-Received: by 2002:a05:6830:23ad:: with SMTP id m13mr13674015ots.121.1615154250616; Sun, 07 Mar 2021 13:57:30 -0800 (PST) Received: from ?IPv6:2601:2c3:ca81:7bc0:147a:84dc:a9b:ce74? ([2601:2c3:ca81:7bc0:147a:84dc:a9b:ce74]) by smtp.gmail.com with ESMTPSA id d1sm2257864otq.66.2021.03.07.13.57.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Mar 2021 13:57:30 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.4\)) Subject: Re: Completion script for the ctags program From: Jacob Gelbman In-Reply-To: <3e0a754f-bbac-404d-92ba-b30f0c736f61@www.fastmail.com> Date: Sun, 7 Mar 2021 15:57:29 -0600 Cc: zsh-workers@zsh.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <31598-1614116362.902856@aI-l.maGv.3QD7> <20210224142437.GC9342@tarpaulin.shahaf.local2> <3e0a754f-bbac-404d-92ba-b30f0c736f61@www.fastmail.com> To: Daniel Shahaf X-Mailer: Apple Mail (2.3608.120.23.2.4) X-Seq: 48154 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: Archived-At: > On Mar 7, 2021, at 3:42 PM, Daniel Shahaf = wrote: >=20 > Thanks for the revision. Not a full review; just two points: >=20 > Jacob Gelbman wrote on Sun, 07 Mar 2021 19:18 +00:00: >>> On Feb 24, 2021, at 8:24 AM, Daniel Shahaf = wrote: >>> Jacob Gelbman wrote on Wed, Feb 24, 2021 at 01:20:24 -0600: >>>> "--fields=3D[include selected extension fields (flags = afmikKlnsStz)]:flags" >>>=20 >>> Recommend to move the afmikKlnsStz thing to after the colon, so = it'll be >>> shown at a more appropriate point. Also, it would be helpful to = display >>> descriptions to the flags using, e.g., =C2=ABcompset=C2=BB (for the = leading plus >>> sign) followed by =C2=AB_values -s ''=C2=BB. >>=20 >> I moved the possible values to the argument description, but I = don=E2=80=99t=20 >> have enough time to figure out how to complete them automatically = right=20 >> now. >=20 > Like this: >=20 > _f() { _arguments : '--foo:bar: _values -s "" baz "a[access]" = "f[file]" "i[inheritance]"' } Right, I can do that. I wasn=E2=80=99t sure if the extra + and - symbols = would make it complicated. >=20 >>>> elif [ "$state" =3D "languages" ]; then >>>> _values -s , languages $languages >>>=20 >>> Don't pass unsanitized command output to a builtin. I don't know = the >>> fix off the top of my head. >=20 > This point has been neither responded to nor implemented. I sanitize the output a little bit, by cutting just the first word from = the list that=E2=80=99s returned. That fixes lines like "OldC++ = [disabled]" And I=E2=80=99m not that worried about possibly feeding in = incorrectly formatted data. What=E2=80=99s the worst that could happen? = The listing will look messed up? >=20 > Daniel