* completion: checkout.* not being completed in zsh
@ 2019-08-15 19:50 Pratyush Yadav
2019-08-16 2:36 ` brian m. carlson
0 siblings, 1 reply; 3+ messages in thread
From: Pratyush Yadav @ 2019-08-15 19:50 UTC (permalink / raw)
To: git
Hi everyone,
I just noticed that checkout.* is not being completed in zsh. I wanted
to set checkout.defaultRemote, but zsh would not auto-complete it.
When I do:
$ git config check<Tab>
zsh does not auto-fill "checkout."
Doing the same in bash works, so the functionality is there, it just
doesn't work in zsh.
Once I add checkout.defaultRemote to my git config, autocompletion
starts working, but only for defaultRemote, even though checkout has two
options: defaultRemote and optimizeNewBranch.
To make it clear, this is what happens once I have added
checkout.defaultRemote to my config:
$ git config check<Tab>
$ git config checkout. # Completes to "checkout.". Correct behaviour.
$ git config checkout.<Tab>
# Completes to defaultRemote, even though it should ask between
# defaultRemote and optimizeNewBranch
$ git config checkout.defaultRemote
I tried looking at contrib/completion, and I can see that zsh completion
works on top of bash completion, so I don't know why exactly it works
for bash but not for zsh.
I am not too familiar with how these auto completion scripts work, so if
someone can point me in the right direction, I'll see if I can figure
out a fix and submit it here.
--
Regards,
Pratyush Yadav
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: completion: checkout.* not being completed in zsh
2019-08-15 19:50 completion: checkout.* not being completed in zsh Pratyush Yadav
@ 2019-08-16 2:36 ` brian m. carlson
2019-08-17 14:00 ` Pratyush Yadav
0 siblings, 1 reply; 3+ messages in thread
From: brian m. carlson @ 2019-08-16 2:36 UTC (permalink / raw)
To: Pratyush Yadav; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 734 bytes --]
On 2019-08-15 at 19:50:27, Pratyush Yadav wrote:
> I tried looking at contrib/completion, and I can see that zsh completion
> works on top of bash completion, so I don't know why exactly it works
> for bash but not for zsh.
>
> I am not too familiar with how these auto completion scripts work, so if
> someone can point me in the right direction, I'll see if I can figure
> out a fix and submit it here.
zsh uses its own completion system which is substantially different from
the bash one and includes definitions for most programs shipped with it.
Are you sure you're using the Git-shipped completions and not the ones
shipped with zsh?
--
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 868 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: completion: checkout.* not being completed in zsh
2019-08-16 2:36 ` brian m. carlson
@ 2019-08-17 14:00 ` Pratyush Yadav
0 siblings, 0 replies; 3+ messages in thread
From: Pratyush Yadav @ 2019-08-17 14:00 UTC (permalink / raw)
To: brian m. carlson; +Cc: git
On 16/08/19 02:36AM, brian m. carlson wrote:
> On 2019-08-15 at 19:50:27, Pratyush Yadav wrote:
> > I tried looking at contrib/completion, and I can see that zsh completion
> > works on top of bash completion, so I don't know why exactly it works
> > for bash but not for zsh.
> >
> > I am not too familiar with how these auto completion scripts work, so if
> > someone can point me in the right direction, I'll see if I can figure
> > out a fix and submit it here.
>
> zsh uses its own completion system which is substantially different from
> the bash one and includes definitions for most programs shipped with it.
> Are you sure you're using the Git-shipped completions and not the ones
> shipped with zsh?
Yes, you are correct. I was using the zsh shipped completion. Using the
git shipped completion fixes this. Thanks.
--
Regards,
Pratyush Yadav
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-08-17 14:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-15 19:50 completion: checkout.* not being completed in zsh Pratyush Yadav
2019-08-16 2:36 ` brian m. carlson
2019-08-17 14:00 ` Pratyush Yadav
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).