completion: fix global bash variable leak on __gitcompappend

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Márcio Almada 2015-04-08 02:45:58 -03:00 committed by Junio C Hamano
parent 282616c72d
commit 852ff1c362

View File

@ -180,7 +180,7 @@ fi
__gitcompappend ()
{
local i=${#COMPREPLY[@]}
local x i=${#COMPREPLY[@]}
for x in $1; do
if [[ "$x" == "$3"* ]]; then
COMPREPLY[i++]="$2$x$4"