From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-return-43546-ml=inbox.vuxu.org@zsh.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id ba25dee5 for ; Tue, 25 Sep 2018 16:51:02 +0000 (UTC) Received: (qmail 15759 invoked by alias); 25 Sep 2018 16:50: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: List-Unsubscribe: X-Seq: 43546 Received: (qmail 12514 invoked by uid 1010); 25 Sep 2018 16:50:50 -0000 X-Qmail-Scanner-Diagnostics: from out1-smtp.messagingengine.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(66.111.4.25):SA:0(-2.6/5.0):. Processed in 3.852663 secs); 25 Sep 2018 16:50:50 -0000 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=kK2iH8 sYpF4rmo1xTcnsqSFbuqbiMtbvTA5WQIowfrg=; b=e81q25B8vDUvzK3gNhwWJM 6A2e9oZTGp+huKn/26S5TbRf5iVtOLo7xIdy87X0+8OgPO1n2tnQWjWVJlCdijwW ZyhSU/qPPDdMXMO2X4yY8GtcBYFmD3nv95WtTKXD2NEFuSeNxR2YS5zCjIKEmaVB r4P7JSLmmkB9jxXwJT6f8qHBp95V4NQsszw1pgvDe0o6mN8HoTOPGfjV5FXit5Ui rYKGfphzPd4i6/12k5JDKm9F7dUsV0hV52m47zix2iZHW9JknHq5YBJVzqKKjqnN iu6qCQva5ypZTeXA0xUk4HFQhANYlhYKZkx6/Pyy6ViS9IfdmADJnrWXmgN7p+PA == 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-sender:x-me-sender:x-sasl-enc; s=fm3; bh=kK2iH8 sYpF4rmo1xTcnsqSFbuqbiMtbvTA5WQIowfrg=; b=gAknMPnTgcjirHMwebYeT8 z9Fs+gi+FnWtweZQAhA13gKOCuFud1WxNEGvNBaL7gCZX/y4geBLZ5o6wqVdYU6e QpHxaK6QZjsQKYnonMPVL+RPSjs9aK2X6jEQc1D+M1gzbymlIILFHAl12d9RmEan FqBwzQMyc3AW6bC3ggvu5BpFEauNAXfbzAVgGK0XImR/ocWkc1hm8DY9grF5jENC FXl6qoTqubDABMn4+ynXYb/BkgTajbPPx8rYOWW0Zc8SY3S1l7W3jAbF2B0BdAV2 VM+IhFwAYxNivPnXrMbg1IDcyHwGI7ABIHi7dqsj6ifOX86s39eAoLJez8iE2/Qw == X-ME-Proxy: X-ME-Sender: Message-Id: <1537894243.3442984.1520252632.2EB83DDE@webmail.messagingengine.com> From: Daniel Shahaf To: zsh-workers@zsh.org Cc: =?utf-8?Q?Marc=20Cornell=C3=A0?= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" X-Mailer: MessagingEngine.com Webmail Interface - ajax-2e36a0dc Subject: Re: [BUG] git checkout completion shows duplicated branch names References: <1537805063.1343776.1518857576.402E4300@webmail.messagingengine.com> <20180924180000.m257nywzw3os6fwh@tarpaulin.shahaf.local2> Date: Tue, 25 Sep 2018 16:50:43 +0000 In-Reply-To: Bart Schaefer wrote on Mon, 24 Sep 2018 17:24 -0700: > On Mon, Sep 24, 2018 at 11:00 AM, Daniel Shahaf wrote: > > > > Can anyone think of a reason to consider matches different if their display > > strings both exist, and differ; or if one of them has a display string and one > > does not? > > Perhaps not in the latter case, but if the items really should be in > two different groups (and the groups are going to be displayed > separately) or the display string is providing info to the user that > explains why one might wish to select that completion, then it's > potentially helpful to include it both times. I tried with: _g() { local a=( foo:FOO bar:BAR ) b=( foo:1 bar:2 ) expl ; _describe -t lorem lorem a; _describe -t ipsum ipsum b; } _h() { local a=( FOO BAR ) ; compadd -V v -ld a foo bar ; compadd -J j -ld a foo bar } and in both cases, "FOO" showed twice, and 'g fo' (respectively 'h fo') did not treat the completion as ambiguous. I conclude that the relaxation of matcheq() does not prevent duplicate matches from being listed twice. However, I can't confirm that conclusion by code inspection. I went through the callsites of matcheq() but they are not terribly well-documented. Does anyone know what permmatches() does? What about makearray()? The docstrings aren't that clear. Should I test any other cases? Cheers, Daniel