@@ -300,7 +300,7 @@ __gitcomp_direct ()
COMPREPLY+=($1)
}
-__gitcompappend ()
+__gitcompadd ()
{
local x i=${#COMPREPLY[@]}
for x in $1; do
@@ -310,12 +310,6 @@ __gitcompappend ()
done
}
-__gitcompadd ()
-{
- COMPREPLY=()
- __gitcompappend "$@"
-}
-
# Generates completion reply, appending a space to possible completion words,
# if necessary.
# It accepts 1 to 4 arguments:
@@ -429,7 +423,7 @@ __gitcomp_builtin ()
__gitcomp_nl ()
{
local IFS=$'\n'
- __gitcompappend "$1" "${2-}" "${3-$cur}" "${4- }"
+ __gitcompadd "$1" "${2-}" "${3-$cur}" "${4- }"
}
# Fills the COMPREPLY array with prefiltered paths without any additional
@@ -442,7 +436,7 @@ __gitcomp_file_direct ()
{
local IFS=$'\n'
- COMPREPLY=($1)
+ COMPREPLY+=($1)
# use a hack to enable file mode in bash < 4
compopt -o filenames +o nospace 2>/dev/null ||
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> --- contrib/completion/git-completion.bash | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)