From: Junio C Hamano Date: Mon, 16 May 2011 23:47:00 +0000 (-0700) Subject: Merge branch 'sg/completion-updates' X-Git-Tag: v1.7.6-rc0~65 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/018443526875456d335fef2dfbc78bc4de2d340d?ds=inline;hp=-c Merge branch 'sg/completion-updates' * sg/completion-updates: Revert "completion: don't declare 'local words' to make zsh happy" git-completion: fix regression in zsh support completion: move private shopt shim for zsh to __git_ namespace completion: don't declare 'local words' to make zsh happy --- 018443526875456d335fef2dfbc78bc4de2d340d diff --combined contrib/completion/git-completion.bash index b81f444496,d6ddf81d69..bb8d7d0878 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@@ -628,12 -628,12 +628,12 @@@ __git_refs_remotes ( __git_remotes () { local i ngoff IFS=$'\n' d="$(__gitdir)" - shopt -q nullglob || ngoff=1 - shopt -s nullglob + __git_shopt -q nullglob || ngoff=1 + __git_shopt -s nullglob for i in "$d/remotes"/*; do echo ${i#$d/remotes/} done - [ "$ngoff" ] && shopt -u nullglob + [ "$ngoff" ] && __git_shopt -u nullglob for i in $(git --git-dir="$d" config --get-regexp 'remote\..*\.url' 2>/dev/null); do i="${i#remote.}" echo "${i/.url*/}" @@@ -1534,7 -1534,7 +1534,7 @@@ __git_log_common_options= __git_log_gitk_options=" --dense --sparse --full-history --simplify-merges --simplify-by-decoration - --left-right + --left-right --notes --no-notes " # Options that go well for log and shortlog (not gitk) __git_log_shortlog_options=" @@@ -2608,6 -2608,10 +2608,10 @@@ _git ( if [[ -n ${ZSH_VERSION-} ]]; then emulate -L bash setopt KSH_TYPESET + + # workaround zsh's bug that leaves 'words' as a special + # variable in versions < 4.3.12 + typeset -h words fi local cur words cword prev @@@ -2659,6 -2663,10 +2663,10 @@@ _gitk ( if [[ -n ${ZSH_VERSION-} ]]; then emulate -L bash setopt KSH_TYPESET + + # workaround zsh's bug that leaves 'words' as a special + # variable in versions < 4.3.12 + typeset -h words fi local cur words cword prev @@@ -2699,7 -2707,7 +2707,7 @@@ complete -o bashdefault -o default -o n fi if [[ -n ${ZSH_VERSION-} ]]; then - shopt () { + __git_shopt () { local option if [ $# -ne 2 ]; then echo "USAGE: $0 (-q|-s|-u)