zsh-workers
 help / Atom feed
* git completion: does not know "git switch"
@ 2019-09-02 14:59 Vincent Lefevre
  2019-09-02 16:45 ` Oliver Kiddle
  0 siblings, 1 reply; 4+ messages in thread
From: Vincent Lefevre @ 2019-09-02 14:59 UTC (permalink / raw)
  To: zsh-workers

If I do "git sw[Tab]", zsh does not find any completion.
It should complete to "git switch".

This is in Debian/unstable, but it seems that
https://sourceforge.net/p/zsh/code/ci/master/tree/Completion/Unix/Command/_git
does not know "git switch" either.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git completion: does not know "git switch"
  2019-09-02 14:59 git completion: does not know "git switch" Vincent Lefevre
@ 2019-09-02 16:45 ` Oliver Kiddle
  2019-09-04  0:29   ` Sebastian Gniazdowski
  2019-09-04  8:20   ` Vincent Lefevre
  0 siblings, 2 replies; 4+ messages in thread
From: Oliver Kiddle @ 2019-09-02 16:45 UTC (permalink / raw)
  To: zsh-workers

Vincent Lefevre wrote:
> If I do "git sw[Tab]", zsh does not find any completion.
> It should complete to "git switch".

% git switch -h
git: 'switch' is not a git command. See 'git --help'.

On further investigation, it seems git switch and restore are new
features of 2.23.0. We're always going to be playing catchup to some
extent. Even where external projects include zsh completions, there
tends to be a lag. The last update to _git on 17 July brought it in
line with git 2.22.0 but you might not want to use that function with
zsh 5.7.1 for other reasons.

We'd be happy to accept any patches to support the new features.

Oliver

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git completion: does not know "git switch"
  2019-09-02 16:45 ` Oliver Kiddle
@ 2019-09-04  0:29   ` Sebastian Gniazdowski
  2019-09-04  8:20   ` Vincent Lefevre
  1 sibling, 0 replies; 4+ messages in thread
From: Sebastian Gniazdowski @ 2019-09-04  0:29 UTC (permalink / raw)
  To: Oliver Kiddle; +Cc: Zsh hackers list

On Mon, 2 Sep 2019 at 18:46, Oliver Kiddle <okiddle@yahoo.co.uk> wrote:
> On further investigation, it seems git switch and restore are new
> features of 2.23.0. We're always going to be playing catchup to some
> extent. Even where external projects include zsh completions, there
> tends to be a lag. The last update to _git on 17 July brought it in
> line with git 2.22.0 but you might not want to use that function with
> zsh 5.7.1 for other reasons.
>
> We'd be happy to accept any patches to support the new features.

Maybe it makes sense to use git help -a? Like in the following (little
diverging to other sub-functions) function:

https://github.com/zdharma/fast-syntax-highlighting/blob/57fbac0462dcccd69c776681d4ba9de097979e1f/chroma/-git.ch#L608

?

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: git completion: does not know "git switch"
  2019-09-02 16:45 ` Oliver Kiddle
  2019-09-04  0:29   ` Sebastian Gniazdowski
@ 2019-09-04  8:20   ` Vincent Lefevre
  1 sibling, 0 replies; 4+ messages in thread
From: Vincent Lefevre @ 2019-09-04  8:20 UTC (permalink / raw)
  To: zsh-workers

On 2019-09-02 18:45:12 +0200, Oliver Kiddle wrote:
> Vincent Lefevre wrote:
> > If I do "git sw[Tab]", zsh does not find any completion.
> > It should complete to "git switch".
> 
> % git switch -h
> git: 'switch' is not a git command. See 'git --help'.
> 
> On further investigation, it seems git switch and restore are new
> features of 2.23.0. We're always going to be playing catchup to some
> extent. Even where external projects include zsh completions, there
> tends to be a lag. The last update to _git on 17 July brought it in
> line with git 2.22.0 but you might not want to use that function with
> zsh 5.7.1 for other reasons.
> 
> We'd be happy to accept any patches to support the new features.

It seems that the git developers provide completions for bash and zsh:

# bash/zsh completion support for core Git.
[...]

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-02 14:59 git completion: does not know "git switch" Vincent Lefevre
2019-09-02 16:45 ` Oliver Kiddle
2019-09-04  0:29   ` Sebastian Gniazdowski
2019-09-04  8:20   ` Vincent Lefevre

zsh-workers

Archives are clonable: git clone --mirror http://inbox.vuxu.org/zsh-workers

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


AGPL code for this site: git clone https://public-inbox.org/ public-inbox