1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-31 22:37:54 +01:00

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 committed by Junio C Hamano
parent 9ab8d18322
commit 0afe8e9e98

View file

@ -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