{"thread":{"id":"51649","subject":"completion: checkout.* not being completed in zsh","startedAt":"2019-08-15T19:50:33Z","lastAt":"2019-08-17T14:00:19Z","messageCount":3,"participants":["Pratyush Yadav","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"380490","messageId":"20190815185901.btf4d7c4ewsccxuu@localhost.localdomain","threadId":"51649","inReplyTo":null,"subject":"completion: checkout.* not being completed in zsh","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2019-08-15T19:50:27Z","receivedAt":"2019-08-15T19:50:33Z","isPatch":false,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"Hi everyone,\n\nI just noticed that checkout.* is not being completed in zsh. I wanted \nto set checkout.defaultRemote, but zsh would not auto-complete it.\n\nWhen I do:\n\n$ git config check<Tab>\n\nzsh does not auto-fill \"checkout.\"\n\nDoing the same in bash works, so the functionality is there, it just \ndoesn't work in zsh.\n\nOnce I add checkout.defaultRemote to my git config, autocompletion \nstarts working, but only for defaultRemote, even though checkout has two \noptions: defaultRemote and optimizeNewBranch.\n\nTo make it clear, this is what happens once I have added \ncheckout.defaultRemote to my config:\n\n$ git config check<Tab>\n$ git config checkout.  # Completes to \"checkout.\". Correct behaviour.\n$ git config checkout.<Tab>\n\n# Completes to defaultRemote, even though it should ask between \n# defaultRemote and optimizeNewBranch\n$ git config checkout.defaultRemote\n\nI tried looking at contrib/completion, and I can see that zsh completion \nworks on top of bash completion, so I don't know why exactly it works \nfor bash but not for zsh.\n\nI am not too familiar with how these auto completion scripts work, so if \nsomeone can point me in the right direction, I'll see if I can figure \nout a fix and submit it here.\n\n-- \nRegards,\nPratyush Yadav\n"},{"id":"380534","messageId":"20190816023649.GB365197@genre.crustytoothpaste.net","threadId":"51649","inReplyTo":"20190815185901.btf4d7c4ewsccxuu@localhost.localdomain","subject":"Re: completion: checkout.* not being completed in zsh","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2019-08-16T02:36:49Z","receivedAt":"2019-08-16T02:36:58Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2019-08-15 at 19:50:27, Pratyush Yadav wrote:\n> I tried looking at contrib/completion, and I can see that zsh completion\n> works on top of bash completion, so I don't know why exactly it works\n> for bash but not for zsh.\n> \n> I am not too familiar with how these auto completion scripts work, so if\n> someone can point me in the right direction, I'll see if I can figure\n> out a fix and submit it here.\n\nzsh uses its own completion system which is substantially different from\nthe bash one and includes definitions for most programs shipped with it.\nAre you sure you're using the Git-shipped completions and not the ones\nshipped with zsh?\n-- \nbrian m. carlson: Houston, Texas, US\nOpenPGP: https://keybase.io/bk2204\n"},{"id":"380577","messageId":"20190817140009.4kelg4yiybb4xphn@localhost.localdomain","threadId":"51649","inReplyTo":"20190816023649.GB365197@genre.crustytoothpaste.net","subject":"Re: completion: checkout.* not being completed in zsh","fromName":"Pratyush Yadav","fromEmail":"me@yadavpratyush.com","sentAt":"2019-08-17T14:00:09Z","receivedAt":"2019-08-17T14:00:19Z","isPatch":false,"sender":{"key":"me@yadavpratyush.com","avatar":"https://avatars.githubusercontent.com/u/8817931?v=4"},"body":"On 16/08/19 02:36AM, brian m. carlson wrote:\n> On 2019-08-15 at 19:50:27, Pratyush Yadav wrote:\n> > I tried looking at contrib/completion, and I can see that zsh completion\n> > works on top of bash completion, so I don't know why exactly it works\n> > for bash but not for zsh.\n> > \n> > I am not too familiar with how these auto completion scripts work, so if\n> > someone can point me in the right direction, I'll see if I can figure\n> > out a fix and submit it here.\n> \n> zsh uses its own completion system which is substantially different from\n> the bash one and includes definitions for most programs shipped with it.\n> Are you sure you're using the Git-shipped completions and not the ones\n> shipped with zsh?\n\nYes, you are correct. I was using the zsh shipped completion. Using the \ngit shipped completion fixes this. Thanks.\n\n-- \nRegards,\nPratyush Yadav\n"}]}