Hi,
it seems that curly braces aren't handled too well by bash-completion.
See this example, with set -x for debugging, and hitting TAB after "git diff
@{-1} -- dri":
$ git diff @{-1} -- dri+ local compfile=./completions
+ [[ /usr/share/bash-completion/bash_completion == */* ]]
+ compfile=/usr/share/bash-completion/completions
+ compfile+='/-1}'
+ [[ -f /usr/share/bash-completion/completions/-1} ]]
+ complete -F _minimal '-1}'
bash: complete: -1: invalid option
complete: usage: complete <bla-bla...>
When the @{-1} is quoted, "dri" is correctly expanded to "drivers".
Another, similar breakage:
$ r drivers/memory/tegra/tegra{-,124-e}mc.c dri+ local compfile=./completions
+ [[ /usr/share/bash-completion/bash_completion == */* ]]
+ compfile=/usr/share/bash-completion/completions
+ compfile+='/-,124-e}mc.c'
+ [[ -f /usr/share/bash-completion/completions/-,124-e}mc.c ]]
+ complete -F _minimal '-,124-e}mc.c'
bash: complete: -,: invalid option
complete: usage: complete <blabla...>
The errors shows up in _completion_loader, but I'm not sure if things don't
break earlier.
Nikolaus