Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Add matchspec for foo/bar branch names in git completion
- X-seq: zsh-users 20221
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Add matchspec for foo/bar branch names in git completion
- Date: Sat, 16 May 2015 22:53:20 +0000
- Cc: zsh-users@xxxxxxx
- 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=
- In-reply-to: <150514103503.ZM30786@torch.brasslantern.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20150514143747.GF1932@tarsus.local2> <150514103503.ZM30786@torch.brasslantern.com>
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<TAB>' 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?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author