git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-completion.bash: replace zsh notation that breaks bash 3.X
@ 2013-01-18 10:31 Brandon Casey
  2013-01-18 15:02 ` Andreas Schwab
  0 siblings, 1 reply; 6+ messages in thread
From: Brandon Casey @ 2013-01-18 10:31 UTC (permalink / raw)
  To: gitster; +Cc: felipe.contreras, git, Brandon Casey

When commit d8b45314 began separating the zsh completion from the bash
completion, it introduced a zsh completion "bridge" section into the bash
completion script for zsh users to use until they migrated to the zsh
script.  The zsh '+=()' append-to-array notation prevents bash 3.00.15 on
CentOS 4.x from loading the completion script and breaks test 9902.  We can
easily work around this by using standard Bash array notation.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
---
 contrib/completion/git-completion.bash | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index a4c48e1..c14e329 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -2431,7 +2431,7 @@ if [[ -n ${ZSH_VERSION-} ]]; then
 				--*=*|*.) ;;
 				*) c="$c " ;;
 				esac
-				array+=("$c")
+				array[$(($#array+1))]="$c"
 			done
 			compset -P '*[=:]'
 			compadd -Q -S '' -p "${2-}" -a -- array && _ret=0
-- 
1.8.1.1.252.gdb33759

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-01-18 19:24 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-18 10:31 [PATCH] git-completion.bash: replace zsh notation that breaks bash 3.X Brandon Casey
2013-01-18 15:02 ` Andreas Schwab
2013-01-18 19:07   ` Brandon Casey
2013-01-18 19:08     ` Junio C Hamano
2013-01-18 19:11       ` Brandon Casey
2013-01-18 19:24         ` [PATCH v2] " Brandon Casey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).