completion: use __gitcompadd for __gitcomp_file

Like the rest of the script does; let's not access COMPREPLY directly.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Felipe Contreras 2013-04-27 15:10:02 -05:00 коммит произвёл Junio C Hamano
Родитель 9ab8d18322
Коммит 0afe8e9e98
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -252,7 +252,7 @@ __gitcomp_file ()
# since tilde expansion is not applied.
# This means that COMPREPLY will be empty and Bash default
# completion will be used.
COMPREPLY=($(compgen -P "${2-}" -W "$1" -- "${3-$cur}"))
__gitcompadd "$1" "${2-}" "${3-$cur}" ""
# Tell Bash that compspec generates filenames.
compopt -o filenames 2>/dev/null