On Tue, May 10, 2011 at 10:13:11PM +0200, Sverre Rabbelier wrote: > This happens if I try use ctrl-shift-r (reverse-i-search) for the > string `git commit -am "S`, resulting in the following: > > (reverse-i-search)`git commit -am "S': git commit -am "Set new Melange > version number to 2-0-20110501 in app.yaml.template." > > If I then hit tab, I get: > > $ bash: words: bad array subscriptversion number to 2-0-20110501 in > app.yaml.template." I can reproduce it here pretty easily. > Hitting tab again gives: > > bash: words: bad array subscript > > Display all 3032 possibilities? (y or n) > > I have no clue how to debug this, other than that it doesn't happen if > I don't source ~/code/git/contrib/completion/git-completion.bash. > > Anyone have any idea's? You can try "set -x" which will show you what was executing. Of course that will spew pages of output. So you'll want to use something like "script", or if you're man enough, "exec 2>stderr" and then do the whole thing blind. ;) It looks like we set $cword too low at some point, as the problematic code seems to be: + upargs+=(-v $vprev "${words[cword - 1]}") bash: words: bad array subscript but I haven't figured out yet where that happens. -Peff -- 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