completion: simplify __gitcomp_1
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
74a8c849f1
commit
3bf421ea62
@ -304,16 +304,16 @@ __git_ps1 ()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# __gitcomp_1 requires 2 arguments
|
|
||||||
__gitcomp_1 ()
|
__gitcomp_1 ()
|
||||||
{
|
{
|
||||||
local c IFS=' '$'\t'$'\n'
|
local c IFS=$' \t\n'
|
||||||
for c in $1; do
|
for c in $1; do
|
||||||
case "$c$2" in
|
c="$c$2"
|
||||||
--*=*) printf %s$'\n' "$c$2" ;;
|
case $c in
|
||||||
*.) printf %s$'\n' "$c$2" ;;
|
--*=*|*.) ;;
|
||||||
*) printf %s$'\n' "$c$2 " ;;
|
*) c="$c " ;;
|
||||||
esac
|
esac
|
||||||
|
printf '%s\n' "$c"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user