From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15650 invoked by alias); 16 May 2015 22:53: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: 20221 Received: (qmail 15902 invoked from network); 16 May 2015 22:53:29 -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=rFJCFo/LCf0LGLGVJXqGJxwntXU=; b=wTjGD+ BTGbsbJr/8mkrVoj07/Xi3D+WI692nTAdgZoY7zgQgH/LQDms4rHMuBXagwmpHDL CmohTYWk0ODQnbkymjW0CN5S5yZpg2KqmOzzH3Zd1XiYtXIjEm9VNAJRaDPemlIx bb6GijP3gH/okK+7/o74CTwd2D+keRg9xapnA= 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=rFJCFo/LCf0LGLGVJXqGJxwntXU=; b=SVLyf qzgleXyMunuBBlsZ8j5Ouud8FQhAQBNiLTOLbhAdzwxp5E3uJc/gEonIE0xFf0f8 qtk8UbLKglG8296exNn3o7ruIaEQREnxTmowhDx0qfs94M5SdO8B9rjZn8KQV/gP fwjczTRf7w3nOwJfXjIGo1x5pZKMELgjpl21fk= X-Sasl-enc: NLVUcwm4RwIb+eHpjwnfTnHWvIWpu+9ffO9B3k5/zhj6 1431816802 Date: Sat, 16 May 2015 22:53:20 +0000 From: Daniel Shahaf To: Bart Schaefer Cc: zsh-users@zsh.org Subject: Re: Add matchspec for foo/bar branch names in git completion Message-ID: <20150516225320.GG1976@tarsus.local2> References: <20150514143747.GF1932@tarsus.local2> <150514103503.ZM30786@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <150514103503.ZM30786@torch.brasslantern.com> User-Agent: Mutt/1.5.21 (2010-09-15) Bart Schaefer wrote on Thu, May 14, 2015 at 10:35:03 -0700: > On May 14, 2:37pm, Daniel Shahaf wrote: > } > } I'd like to add a matchspec to git heads completion, such that > } 'git checkout o/m' would complete to 'origin/master'. > } > } However, I can't seem to get the matchspec right. > > I'm not sure you can do that with a matchspec; you might need to use the > _multi_parts helper function. Thanks for the suggestion. _multi_parts offers completions component-wise: e.g., with branches origin/master origin/interrupt_abort foo/master foo/bar the existing code offers each of those as a completion, but _multi_parts offers just 'origin' and 'foo'. I could see that being useful for some people, but for us mortals with few branches it'd be a functionality regression. Other ideas?