From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4040 invoked by alias); 8 Oct 2015 09:40:33 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20709 Received: (qmail 12542 invoked from network); 8 Oct 2015 09:40:32 -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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-AuditID: cbfec7f5-f794b6d000001495-78-56163a0e228b Date: Thu, 08 Oct 2015 10:39:51 +0100 From: Peter Stephenson To: Zsh Users' List Subject: Re: tag-order with git refs Message-id: <20151008103951.483879c3@pwslap01u.europe.root.pri> In-reply-to: <28911.1444256551@thecus.kiddle.eu> References: <20151007120820.6f8a59e9@pwslap01u.europe.root.pri> <28911.1444256551@thecus.kiddle.eu> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrMLMWRmVeSWpSXmKPExsVy+t/xa7p8VmJhBss3MFvsOLmS0YHRY9XB D0wBjFFcNimpOZllqUX6dglcGcuW/WEs+MtTsffKY+YGxgNcXYycHBICJhJX3p9hh7DFJC7c W8/WxcjFISSwlFHiRe91dghnGpNE5+rvrBDOVkaJw7d/gLWwCKhKbN/9jw3EZhMwlJi6aTYj iC0ioC6x4no7E4gtLKAiceb9V7B6XgF7iRcTX4DVcAoYSMw+3QrUywE0NFVi9jF1kDC/gL7E 1b+fmCAuspeYeeUMI0SroMSPyfdYQGxmAS2JzduaWCFseYnNa94yg9hCQGtv3N3NPoFRaBaS lllIWmYhaVnAyLyKUTS1NLmgOCk910ivODG3uDQvXS85P3cTIyRov+5gXHrM6hCjAAejEg/v D2ORMCHWxLLiytxDjBIczEoivMukxcKEeFMSK6tSi/Lji0pzUosPMUpzsCiJ887c9T5ESCA9 sSQ1OzW1ILUIJsvEwSnVwKirenVfo9zquZJnAsNXzH/07dSuj8dUP+a/6t60e+XEUIXDs9ma r5wPaLecu8g9RGRpWtqEBzmVV5juXT2dcWXfRh/vH+vr+24oijqVpqlyxH97pPR7o7e21Vo7 4TcSXzYlVsgEXbvwtu7O3CcrhY56zpyxYeGiRftOdNlcq7Ro2Wi//ve2ROXPSizFGYmGWsxF xYkA7VI61FYCAAA= On Thu, 8 Oct 2015 00:22:31 +0200 Oliver Kiddle wrote: > Peter wrote: > > How do I limit completion after "git checkout" to showing local heads > > first (i.e. branches I actually use)? > > > > zstyle ':completion:*:complete:git-checkout:*' tag-order heads-local > > There are several nested tag loops in _git. In such cases, I find it > works better to list all tags along the path: > zstyle ':completion:*:complete:git-checkout:*' tag-order 'tree-ishs heads heads-local' Aha, that's already a good start. I'm starting to see why the patterns did bizarre things --- I wasn't banking on needing multiple tag matches to get a single completion. Sounds like there are at least some possibilities for improving this, but I wonder if we can make ^xh a bit more helpful about what you actually need to do in a particular case? That would save a lot of documentation for a lot of completions. It's sort of mentioning the right words but doesn't give any help about how you need to combine them. If we could make it build up a "story so far" string and output it at the end, or something like that...? > This has limitations. _next_tags will advance within inner tag loops > first before tracking back to outer ones. There are other irritations here > like ORIG_HEAD making it hard to complete origin/ given case-insensitive > matching control. And I'm getting completions for heads-remote, somehow (that's before your patch, at least). Oooh... zstyle ':completion:*:complete:git-checkout:*' ignored-patterns '*/*' With the _ignored completer that does something like what I want. Thanks pws