From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7152 invoked by alias); 19 May 2015 20:44:51 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 35226 Received: (qmail 5839 invoked from network); 19 May 2015 20:44:50 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=7+Az472Tj2VfGCKGFgFuIuic8Uk=; b=Q0887f SmmUYuZcje8v4CuMcS3wHry/VvseBwdL+k0/mEhUpFetPKNCEhMRaZAKbHzGKkHc 9yjP732R7OXdsRqGbYFVZuPLwRjTItPhvNVwM24TJDlT3KAOhgl5q3XbjUAz4Z+x jNpIcSPDC5zYNPt5NsyjlhVGdx6xtdtg0LGu4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=7+Az472Tj2VfGCKGFgFuIuic8Uk=; b=ftzEZ rQrUcyDWek09lbBQ0o1bqAXKOzKEZvRokjAwhgsc+kkLNODpW03e0KTyjHN8Ev32 ybpuj++du2UWXi4w8x8oIVmlYXiPx8EpjJ8nlRvSruHUFBRgRpATMePRsVZfqU+a gSGSamM4/sDovQRb6V6+rNcJaVKJ7w42NbQkY0= X-Sasl-enc: yhidRLs7Bq7XytVSiPqrmbVFI4CKDp6lDg08Eak4IX7P 1432068289 Date: Tue, 19 May 2015 20:44:46 +0000 From: Daniel Shahaf To: Zsh Hackers' List Cc: Daniel Hahler Subject: Re: [PATCH] compdescribe fix for unsorted groups (workers/34814) (was: Re: completion: git: --fixup: problem with _describe -2V and duplicate commit subjects) Message-ID: <20150519204446.GC1837@tarsus.local2> References: <5510AAD4.8040807@thequod.de> <20150329054753.GA2766@tarsus.local2> <20150514143627.GE1932@tarsus.local2> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="W/nzBZO5zC0uMSeA" Content-Disposition: inline In-Reply-To: <20150514143627.GE1932@tarsus.local2> User-Agent: Mutt/1.5.21 (2010-09-15) --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Daniel Shahaf wrote on Thu, May 14, 2015 at 14:36:27 +0000: > The first attached patch seems to address this. However, > I encountered an odd problem with it, which I have not been able to > narrow down. [... 'git checkout 1' ...] I'm not sure whether > this indicates a bug in the first patch or an independent problem. The 'git checkout ' issue is an independent problem. Daniel Hahler has determined that the garbled output is due to _git's calling __git_commit_objects twice (cf 35216). The attached minimal example demonstrates the problem. So, in summary: 1. The first patch in 35127 fixes the problem introduced by 34671, reported in 34768, and analysed in 34814. The minimal example at the top of 35127 produces garbled output without 35127 and correct output with 35127. 2. The second patch in 35127 triggered garbled output in 'git checkout ' because of a preexisting problem in _git, which 35216 fixes. An example of the garbled output is in 35169, surrounded by triple square brackets. 3. I propose the following documentation patch: diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo index a081ea3..5043e7b 100644 --- a/Doc/Zsh/compsys.yo +++ b/Doc/Zsh/compsys.yo @@ -4197,6 +4197,9 @@ description will appear together in the list. tt(_describe) uses the tt(_all_labels) function to generate the matches, so it does not need to appear inside a loop over tag labels. + +tt(_describe) should not be called more than once in a single call to +a completion function. ) findex(_description) item(tt(_description) [ tt(-x) ] [ tt(-12VJ) ] var(tag) var(name) var(descr) [ var(spec) ... ])( Unless objections, I'll commit 35127#1 (the first of the two patches attached to that email). Daniel --W/nzBZO5zC0uMSeA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="ftwice.txt" a=(dalton:bar charlie:bar bob:foo alice:foo) _ftwice() { _describe -2 -V -x person a; _describe -2 -V -x person a }; compdef _ftwice ftwice % ftwice > person charlie alice dalton bob -- bar -- foo charlie alice dalton bob -- bar -- foo --W/nzBZO5zC0uMSeA--