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