Browse Source

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>
maint
Felipe Contreras 12 years ago committed by Junio C Hamano
parent
commit
0afe8e9e98
  1. 2
      contrib/completion/git-completion.bash

2
contrib/completion/git-completion.bash

@ -252,7 +252,7 @@ __gitcomp_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

Loading…
Cancel
Save