I know Git aliases can be used with arguments Git Faq section "Git Aliases with argument".

But today I encountered an error.

Take an easy example which is not suitable for real use. If I make an alias like this:

[alias]
    lo = "!sh -c 'git log $1' -"

then I can use

git lo file_a

to see the log of file_a.

But when I used "tab" to auto-complete the path, the following error occurs.

git lo [tab]

error msg:

sh: declare: `_git_{': not a valid identifier

It seems a bug in git-completion.bash. But I can't find where the `_git_{' is!

Also I find that in the error msg the quote mark around _git_{ seems strange.

BTW, my msysgit version is 1.7.6-preview20110708

ADD:

The other strange thing is, I searched all files under the dir of Git, find there is no file contains the string _git_{.

Edit
Report