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>
Felipe Contreras committed
Apr 27, 2013 at 15:10 UTC
0afe8e9e98b0b066105e03476f7c8f4c14bc1c15
1 file changed
+1
-1
contrib/completion/git-completion.bash
+1
-1
@@ -252,7 +252,7 @@ __gitcomp_file ()
252
# since tilde expansion is not applied.
253
# This means that COMPREPLY will be empty and Bash default
254
# completion will be used.
255
- COMPREPLY=($(compgen -P "${2-}" -W "$1" -- "${3-$cur}"))
255
+ __gitcompadd "$1" "${2-}" "${3-$cur}" ""
256
257
# Tell Bash that compspec generates filenames.
258
compopt -o filenames 2>/dev/null