On Tue, May 10, 2011 at 6:17 AM, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote: > Jonathan Nieder wrote: > >> Âcontrib/completion/git-completion.bash | Â Â2 ++ >> Â1 files changed, 2 insertions(+), 0 deletions(-) > > I forgot to list changes since v4: > > Â- new commit message > Â- removed comment I considered unclear --- probably the following > Â should be squashed in, though, to prevent someone from seeing the > Â seemingly redundant "typeset -h words" and removing it, not > Â realizing it is needed for compatibility with old zsh versions. > > -- >8 -- > From: Felipe Contreras <felipe.contreras@xxxxxxxxx> > Subject: completion: add a comment to explain what "typeset -h words" is for > > In current zsh master, bashcompinit hides the 'words' special variable > already, so our own "typeset -h words" in _git and _gitk might seem > redundant. ÂAdd a comment to explain that it is there for > compatibility with old zsh versions. > > [jn: based on the original comment by Felipe Contreras] > > Signed-off-by: Jonathan Nieder <jrnieder@xxxxxxxxx> > --- > Âcontrib/completion/git-completion.bash | Â Â8 ++++++++ > Â1 files changed, 8 insertions(+), 0 deletions(-) > > diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash > index da586e5..b80830e 100755 > --- a/contrib/completion/git-completion.bash > +++ b/contrib/completion/git-completion.bash > @@ -2608,6 +2608,10 @@ _git () > Â Â Â Âif [[ -n ${ZSH_VERSION-} ]]; then > Â Â Â Â Â Â Â Âemulate -L bash > Â Â Â Â Â Â Â Âsetopt KSH_TYPESET > + > + Â Â Â Â Â Â Â # Suppress the "words" special variable from zsh. That is not accurate. This is hiding the special meaning of the 'words' variable, only locally. "Suppress" denotes that the special meaning of 'words' is gone forever, even on outer layers of the call stack. > + Â Â Â Â Â Â Â # Only zsh versions <= 4.3.11 need this --- in later > + Â Â Â Â Â Â Â # versions, bashcompinit takes care of it. That can be explained in shorter form: # Workaround for versions < 4.3.12 The word workaround denotes that there's a bug, and by limiting where the workaround is needed, it's obvious where proper fix is. All this can be explained in this sentence: # workaround zsh's bug which leaves 'words' as a special variable in versions < 4.3.12 What is the need to change that? -- Felipe Contreras -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html