Code

completion: simplify __gitcomp and __gitcomp_nl implementations
authorFelipe Contreras <felipe.contreras@gmail.com>
Thu, 2 Feb 2012 19:48:08 +0000 (11:48 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 6 Feb 2012 23:53:33 +0000 (15:53 -0800)
commit583e4d579d36894ccdc1f4fb4a6dd24c9274c5f8
tree559617acca04f9659d8c9b63ba969d225c45d447
parentd79f81adfe02a3f0eaf8deba5fb81dd220b72aae
completion: simplify __gitcomp and __gitcomp_nl implementations

These shell functions are written in an unnecessarily verbose way;
simplify their "conditionally use $<number> after checking $# against
<number>" logic by using shell's built-in conditional substitution
facilities.

Also remove the first of the two assignments to IFS in __gitcomp_nl
that does not have any effect.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash