I had this problem too, and every google search led me to this post.
I am posting a solution that I found using Michal's answer and Daenyth's comment ...
My git -flow.bash was identical, but I think our git completion files may be different.
To fix this, I had to modify the git completion file located in /etc/bash_completion.d/git
Old:
# __git_find_on_cmdline requires 1 argument __git_find_on_cmdline () { local word subcommand c=1 while [ $c -lt $cword ]; do word="${words[c]}" for subcommand in $1; do if [ "$subcommand" = "$word" ]; then echo "$subcommand" return fi done c=$((++c)) done }
New:
# __git_find_on_cmdline requires 1 argument __git_find_on_cmdline () { local word subcommand c=1 while [[ $c -lt $cword ]]; do word="${words[c]}" for subcommand in $1; do if [ "$subcommand" = "$word" ]; then echo "$subcommand" return fi done c=$((++c)) done }
Notice the double bracket that I had to add to the new code. That was the only change I made.
source share