Re: [PATCH for maint] git-completion: fix zsh support
- From
Felipe Contreras <felipe.contreras@gmail.com>
- Date
- May 9, 2011, 13:51 UTC
- Message-ID
- <BANLkTi=gNO6YyWKhTSX0=irEme-9vwyH2Q@mail.gmail.com>
- In-Reply-To
- <20110506095920.GA1635@elie>
On Fri, May 6, 2011 at 12:59 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
Show 8 quoted lines
> Felipe Contreras wrote: > >> No, the scope remains local. > > Is this local in the sense of typeset used in ksh functions declared > as "function f" or local in the sense of typeset used in ksh functions > declared as "f ()"? If the latter, I think you misunderstood me --- I > never meant to suggest otherwise.
I'm sorry, I don't know what you mean.
By "local" I mean that all the layers bellow in the call stack will use a separate "words" variable than the layers above.
Show 8 quoted lines
>> In fact, if you follow the link I posted, that's precisely the fix the >> zsh guys were pushing for. And the it is already merged: >> http://zsh.git.sourceforge.net/git/gitweb.cgi?p=zsh/zsh;a=commitdiff;h=e880604f029088f32fb1ecc39213d720ae526aaa > > Now this changes things (since it amounts to a guarantee that the > bash completion emulation has already extracted all it needs from > $words before calling a completion function). What happens if someone > calls "compgen -F" after words is hidden?
I fail to see an example of that. Why don't you try?
>> Well, it's hosted on debian.org, and I haven't seen it used anywhere >> else. I just don't know how else to identify that project. > > Here you go: http://pkgs.fedoraproject.org/gitweb/?p=bash-completion.git;a=tree
That's just packaging: URL: http://bash-completion.alioth.debian.org/
http://pkgs.fedoraproject.org/gitweb/?p=bash-completion.git;a=blob;f=bash-completion.spec;h=855462dd092a50959d9576f6bc02c01332dd63a2;hb=HEAD#l12
Show 16 quoted lines
>> I think the simplest fix is the one I'm proposing > > I'm happy with it as long as the zsh people are committed to making > sure it continues to work (which it sounds like they are, luckily). > I suppose it is intended to obsolete the third patch from Gábor's > series? Could you provide an explanation for the commit log, > something to the effect that > > - the words array has special meaning > - that produces such-and-such puzzling symptoms > - zsh 4.3.12 (?) will fix it by using "typeset -h" to hide it when > running completion functions designed for bash > - we can make the same fix to work correctly with earlier versions of > zsh, and that's what this patch does > > ?
I thought that's what I explained more or less. I will add the missing point and the new developments on the commit message and resend.
Cheers.
-- Felipe Contreras