From: Felipe Contreras Date: Wed, 27 Apr 2011 10:09:28 GMT Subject: Re: [RFC/PATCH] completion: avoid "words" as variable name for zsh portability Message-ID: In-Reply-To: On Wed, Apr 27, 2011 at 12:49 PM, Felipe Contreras wrote: > On Wed, Apr 27, 2011 at 12:11 PM, Jonathan Nieder 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