Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Add matchspec for foo/bar branch names in git completion



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