Skip to content

Commit 0afe8e9

Browse files
felipecgitster
authored andcommitted
completion: use __gitcompadd for __gitcomp_file
Like the rest of the script does; let's not access COMPREPLY directly. Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9ab8d18 commit 0afe8e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/completion/git-completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ __gitcomp_file ()
252252
# since tilde expansion is not applied.
253253
# This means that COMPREPLY will be empty and Bash default
254254
# completion will be used.
255-
COMPREPLY=($(compgen -P "${2-}" -W "$1" -- "${3-$cur}"))
255+
__gitcompadd "$1" "${2-}" "${3-$cur}" ""
256256

257257
# Tell Bash that compspec generates filenames.
258258
compopt -o filenames 2>/dev/null

0 commit comments

Comments
 (0)