Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] git checkout completion shows duplicated branch names
- X-seq: zsh-workers 43546
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [BUG] git checkout completion shows duplicated branch names
- Date: Tue, 25 Sep 2018 16:50:43 +0000
- Cc: Marc Cornellà <marc.cornella@xxxxxxxx>
- 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 ==
- In-reply-to: <CAH+w=7ZJOm+h-NPACWbQcLrLigBe_QZm+7zGaUw2zSWS=Twm4g@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <AM0P195MB03370F6E436A8BA5D4ECE09D84170@AM0P195MB0337.EURP195.PROD.OUTLOOK.COM> <1537805063.1343776.1518857576.402E4300@webmail.messagingengine.com> <20180924180000.m257nywzw3os6fwh@tarpaulin.shahaf.local2> <CAH+w=7ZJOm+h-NPACWbQcLrLigBe_QZm+7zGaUw2zSWS=Twm4g@mail.gmail.com>
Bart Schaefer wrote on Mon, 24 Sep 2018 17:24 -0700:
> On Mon, Sep 24, 2018 at 11:00 AM, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> 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<TAB>' (respectively 'h
fo<TAB>') 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author