On Wed, Apr 27, 2011 at 12:49 PM, Felipe Contreras <felipe.contreras@xxxxxxxxx> wrote: > On Wed, Apr 27, 2011 at 12:11 PM, Jonathan Nieder <jrnieder@xxxxxxxxx> wrote: >> Thanks. ÂIt looks like to get the semantics I expect from "local" >> in zsh, one needs to use "typeset -h" (which bash does not support, >> unfortunately). ÂProbably it is best to steer clear of zsh's special >> variables anyway. > > Hmm, interesting, maybe we should try to find a way to replace those > 'local' with 'typeset -h'. This seems to do it: --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -75,6 +75,10 @@ if [[ -n ${ZSH_VERSION-} ]]; then autoload -U +X bashcompinit && bashcompinit + + # 'words' has special meaning in zsh, and only typeset -h seems to + # override that + alias local="typeset -h" fi case "$COMP_WORDBREAKS" in -- 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