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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 11092 invoked from network); 13 Dec 2020 17:31:52 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 13 Dec 2020 17:31:52 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1607880712; b=x7B8BFYnnmPtFFHw2pNuaxszXRYzmYp+9Jvva2PD1cg3v2nJi2MnZaG12cT+6p8GiFqoud6HiR We8XchBBs5g2amVvmgBatQjgmjRhWsyVejnL//OKwvV3tA7mxfffxtsFnFbNhjhdG/qJK0TOBV Ne8P7bAO1PQRP1kMjsJHX+v6BpzmkVhb838bazWUsJ4sK+pmlBNdzCzAaYpHy/TlcyTs26HrY+ O+pQsA5Kwuc9DwGrc7MuJO3FcNq8kxTvxA5MLIftKfvjDyo0yZM6xIyp1zzgXyGnRU4MLKtCh+ t1NRPw45eCdxi61ivcgdJ/Z1VEDSou5XhxRR/O6l9KstxA==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out2-smtp.messagingengine.com) smtp.remote-ip=66.111.4.26; dkim=pass header.d=daniel.shahaf.name header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1607880712; bh=TT2bx2c6Iljejft6sSwXUekdyx8y87egEpXnAD5TONg=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=HH3MVOKmt9rnFwXO5fJl3fjfWKcW9zLPYGmVs6tgxyoYMKnwNItQAKp2F0MAab4d50Ta9J+x3R Mgr017NySUK0xFCscpYjjypYijcIKumzzDkdcvSy2wtsuN72WAWqLfICbuKVWx3RMFsKcWAXjy CcGI1iFsbVZcqz0ZIb3b0GZ76peGx2sBv/JcaF4bermNGntquL6dWcaDsCkhr5GKpoLyIfXFsE Tc8ClNqwr1y5njeDmJpcmC0p4FfRvyNo2t8AdyT8I1nCikc0vCPd06FNSuVc8CIEulckfZd3Sf jXb2E0xwlurGFDTXFjz1SYJH34h93XOoBL0efaKpOaDWvQ==; 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:In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID; bh=uyX+AS9pLk34VJ+33uWFoYzSMVwEPMjg5DFDLy9+64c=; b=dAQeytWQGKmozEXrrm4lF6qVf5 3+ly8FKlAL4NnjJjaOnB7rxXzPCW4DiGQgdWv1Q1UureccvLDFIX9vbK5+6n0oyzIdSXBBFKKBuqb 8A2FWfXeaTCqLAiL84LENd51TAydG7lcBhGuE8Qx2/L6gvApRrWwELgg4OgIfmIJB7ke5B4C+2rv4 0NXh6YMkcKR2YRgBlKG78cz/5D61BHeuaY/XYxZSWtx93CLx3istRnxP7DeW5wZf9NuNcSftQjXK1 WzQQYoA0vHsWODlxYqpbqgGu3BIckbaSZ0HpKKJRjGFwDZwCnOJIk4Z897Pp/mGNrnAkJuvcAO1+W QOkhYgdQ==; Received: from authenticated user by zero.zsh.org with local id 1koVDl-0002M6-Jq; Sun, 13 Dec 2020 17:31:45 +0000 Authentication-Results: zsh.org; iprev=pass (out2-smtp.messagingengine.com) smtp.remote-ip=66.111.4.26; dkim=pass header.d=daniel.shahaf.name header.s=fm2 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm1 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from out2-smtp.messagingengine.com ([66.111.4.26]:50457) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256) id 1koVDQ-0002Cq-6O; Sun, 13 Dec 2020 17:31:26 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id C242A5C007F; Sun, 13 Dec 2020 12:31:22 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Sun, 13 Dec 2020 12:31:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:to:cc:subject:message-id :references:mime-version:content-type:content-transfer-encoding :in-reply-to; s=fm2; bh=uyX+AS9pLk34VJ+33uWFoYzSMVwEPMjg5DFDLy9+ 64c=; b=LdcNZPxdm+N+dVWZnSl06C7Gsa+oWyKi/ycg2JgxCzDgmPsbdRnMu1GU JozPSAJ7NzfnJTK5z3Fg4D9TV04vs1Y2+2p9AL8yvwes6vKz1mkQvRyU6ZIa/aLe nAE4+jFlPap5z+6wJCpqITE5ObpVTpvAy+hegl5TExiX3z7uwwosPqoPbmwEedQs uGUqCoEwS7X1Fs+2zs+cC7Ke4J0HdqSTPmW8LGHRQVP4aLD8ODRGxTN5BQKLM21i MdcCV0+Pb9VFgz6Co3HNl5IjIhY8ueAKxiz7R2ykuy92BC7i+yDE4ZSn+BCtQu8H ZvLm7xK3Alb4jY3dquO4rK3a6nU+1w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=uyX+AS9pLk34VJ+33uWFoYzSMVwEPMjg5DFDLy9+6 4c=; b=bWexiFp9ca7ySCm/cINjimg5zb69cLwq/QMNPWGw94kmb8tRZGrtCdZL+ VGwkPSMkBWMgAiQiCm2g5aIU4vAgx5URHGt97QNwhEnSj6JWfCYnwJ1AyK2lpg1i KJuzYIct95oBRVwliXqjHhyNT0O3lSn0CELg7zWKaRdCd8VPJnO2NP771oi7GuUU H0ND58RyuJafmJMwD7dByaKkuP4YX2LG740TxeSau2LvgeZSd8SynKnVA2Dxg/ry fOcxqhSjPfpSYUxMPBxFNxfTR5Au0r15xDTla3SThotqlB/yv8rcqwmw/JeWbcLj BWiNSH6Elp0f22+Gp5zPNTzKrASIQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrudekiedguddtfecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepfffhvffukfhfgggtugfgjggfse htkedttddtredunecuhfhrohhmpeffrghnihgvlhcuufhhrghhrghfuceougdrshesuggr nhhivghlrdhshhgrhhgrfhdrnhgrmhgvqeenucggtffrrghtthgvrhhnpefgleehtdffue fhgeeuleefffejgedttdelhedvvdeuiefhvefgvdfghfevvdekteenucfkphepjeelrddu kedtrdeikedrudefheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrih hlfhhrohhmpegurdhssegurghnihgvlhdrshhhrghhrghfrdhnrghmvg X-ME-Proxy: Received: from tarpaulin.shahaf.local2 (bzq-79-180-68-135.red.bezeqint.net [79.180.68.135]) by mail.messagingengine.com (Postfix) with ESMTPA id D666E24005A; Sun, 13 Dec 2020 12:31:21 -0500 (EST) Received: by tarpaulin.shahaf.local2 (Postfix, from userid 1005) id 4CvBQH4YDnz1pC; Sun, 13 Dec 2020 17:31:19 +0000 (UTC) Date: Sun, 13 Dec 2020 17:31:19 +0000 From: Daniel Shahaf To: dana Cc: Zsh hackers list Subject: Re: [PATCH] Fix zstyle option completion Message-ID: <20201213173119.GA6254@tarpaulin.shahaf.local2> References: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Seq: 47740 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: dana wrote on Sat, Dec 12, 2020 at 22:15:47 -0600: > I often retrieve zstyle commands from history and then edit them to add -d or > whatever at the beginning. But the completion function won't complete for you > there because of the change made by Daniel in workers/39659. > A regression, then? Sorry about that. Could you clarify the precise LBUFFER/RBUFFER values that "won't complete"? > @Daniel: I think this achieves what you wanted without breaking my use case, > doesn't it? Or did you have something else in mind that i'm not seeing? What I had in mind in that commit was to complete the correct non-option arguments after the options listed in the log message; e.g., «zstyle -s », «zstyle -s foo », «zstyle -s foo bar ». The «(-)» exclusions in the line changed were designed to make that line complete the "set a zstyle" syntax, «zstyle foo bar baz» without any of the options (not even -e, which is handled separately). As written, I think the patch will cause «zstyle -g foo bar baz » to offer completions, whereas currently it correctly completes nothing. (Just observing; not implying any conclusions.) Cheers, Daniel (ENOTIME to test, sorry) > diff --git a/Completion/Zsh/Command/_zstyle b/Completion/Zsh/Command/_zstyle > index 75acde5f7..9e82d8ad5 100644 > --- a/Completion/Zsh/Command/_zstyle > +++ b/Completion/Zsh/Command/_zstyle > @@ -217,7 +217,7 @@ taglist=( > ) > > # Be careful with the context arguments here. They like to masquerade. > -_arguments -C \ > +_arguments -C -A '-*' \ > '(: -)-L[output in form of zstyle commands]:pattern for context patterns:->metapatterns:style:->metastyles' \ > '(: -)-d[delete style definitions]:verbatim context pattern:->patterns:*:styles:->pstyles' \ > '(: -)-e[value is evaluated when style is looked up]:context pattern:->contexts:style:->styles:*:command:_cmdstring' \ > @@ -228,7 +228,7 @@ _arguments -C \ > '(: -)-t[test a style, returning false if it'\''s undefined]:context name:->contexts:style:->styles:*:strings to test presence of: ' \ > '(: -)-T[test a style, returning true if it'\''s undefined]:context name:->contexts:style:->styles:*:strings to test presence of: ' \ > '(: -)-m[pattern-match values of a style]:context name:->contexts:style:->styles:pattern: ' \ > - '(-):context pattern:->contexts' '(-):style:->styles' '(-)*:argument:->style-arg' > + ':context pattern:->contexts' ':style:->styles' '*:argument:->style-arg' > > while (( $#state )); do > case "$state[1]" in > >