{"thread":{"id":"26676","subject":"Completion for branches or tags broken with zsh","startedAt":"2011-03-06T21:38:21Z","lastAt":"2011-04-02T22:50:45Z","messageCount":2,"participants":["Stefan Haller","Jonathan Nieder"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"162860","messageId":"1jxqbmc.vc0luayavmrkM%lists@haller-berlin.de","threadId":"26676","inReplyTo":null,"subject":"Completion for branches or tags broken with zsh","fromName":"Stefan Haller","fromEmail":"lists@haller-berlin.de","sentAt":"2011-03-06T21:38:21Z","receivedAt":"2011-03-06T21:38:21Z","isPatch":false,"sender":{"key":"lists@haller-berlin.de","avatar":null},"body":"In the current master (and 1.7.4), tab completion for refs doesn't work\nin zsh.  When typing \"git log orig<TAB>\", nothing appears.\n\nA revision that works for me is 5a3a484d57.  I suspect it may have\nsomething to do with dbda3b1090, but it's hard to bisect because many\nrevisions on the way can't even be loaded by zsh.\n\nI don't know enough about the completion mechanisms to be able to debug\nthis myself.  Anybody able to help?\n\n(My zsh version is 4.3.9, in case it makes a difference.)\n\n\n-- \nStefan Haller\nBerlin, Germany\nhttp://www.haller-berlin.de/\n"},{"id":"164966","messageId":"20110402225045.GA22781@elie","threadId":"26676","inReplyTo":"1jxqbmc.vc0luayavmrkM%lists@haller-berlin.de","subject":"Re: Completion for branches or tags broken with zsh","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2011-04-02T22:50:45Z","receivedAt":"2011-04-02T22:50:45Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi Stefan,\n\nStefan Haller wrote:\n\n> In the current master (and 1.7.4), tab completion for refs doesn't work\n> in zsh.  When typing \"git log orig<TAB>\", nothing appears.\n\nSorry for the long silence.  Indeed, it seems that I broke this in\nda48616f1d (bash: get --pretty=m<tab> completion to work with bash v4,\n2010-12-02).  No fix yet.\n\nHere's the puzzle: _git calls _get_comp_words_by_ref to fill the local\narray \"${words[@]}\".  It doesn't succeed.  Within _get_comp_words_by_ref,\n${words[@]} gets filled correctly, but within _git, it keeps the value it\npreviously had.\n\nAlas, that's as far as I can get without learning something about zsh. :)\nI can't reproduce it when defining functions like this directly, so\nthere might be something subtle going on.\n\nHints?\n\nThanks for noticing.\nJonathan\n"}]}