Commit 583e4d5
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>1 parent d79f81a commit 583e4d5
1 file changed
Lines changed: 3 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
495 | 495 | | |
496 | 496 | | |
497 | 497 | | |
498 | | - | |
| 498 | + | |
499 | 499 | | |
500 | | - | |
501 | | - | |
502 | | - | |
503 | 500 | | |
504 | 501 | | |
505 | 502 | | |
| |||
524 | 521 | | |
525 | 522 | | |
526 | 523 | | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
532 | | - | |
533 | | - | |
534 | | - | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
| 524 | + | |
| 525 | + | |
539 | 526 | | |
540 | 527 | | |
541 | 528 | | |
| |||
0 commit comments