Commit 2b7b758
send-email: programmatically generate bash completions
"git send-email --git-completion-helper" only prints "format-patch"
flags. Make it print "send-email" flags as well, extracting them
programmatically from its three existing "GetOptions".
Introduce a "uniq" subroutine, otherwise --cc-cover, --to-cover and
other flags would show up twice. In addition, deduplicate flags common
to both "send-email" and "format-patch", like --from.
Remove extraneous flags: --h and --git-completion-helper.
Add trailing "=" to options that expect an argument, inline with
the format-patch implementation.
Add a completion test for "send-email --validate", a send-email flag.
Signed-off-by: Thiago Perrotta <tbperrotta@gmail.com>
Based-on-patch-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 99c99ed commit 2b7b758
File tree
3 files changed
+48
-19
lines changed- contrib/completion
- t
3 files changed
+48
-19
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2359 | 2359 | | |
2360 | 2360 | | |
2361 | 2361 | | |
2362 | | - | |
2363 | | - | |
2364 | | - | |
2365 | | - | |
2366 | | - | |
2367 | | - | |
2368 | | - | |
2369 | | - | |
2370 | | - | |
2371 | | - | |
| 2362 | + | |
2372 | 2363 | | |
2373 | 2364 | | |
2374 | 2365 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
116 | 121 | | |
117 | | - | |
118 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
119 | 148 | | |
120 | 149 | | |
121 | 150 | | |
| |||
425 | 454 | | |
426 | 455 | | |
427 | 456 | | |
428 | | - | |
| 457 | + | |
429 | 458 | | |
430 | 459 | | |
431 | 460 | | |
| 461 | + | |
432 | 462 | | |
433 | 463 | | |
434 | 464 | | |
| |||
444 | 474 | | |
445 | 475 | | |
446 | 476 | | |
447 | | - | |
448 | | - | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
449 | 482 | | |
450 | 483 | | |
451 | 484 | | |
452 | | - | |
| 485 | + | |
453 | 486 | | |
454 | | - | |
| 487 | + | |
455 | 488 | | |
456 | 489 | | |
457 | 490 | | |
| |||
508 | 541 | | |
509 | 542 | | |
510 | 543 | | |
511 | | - | |
| 544 | + | |
| 545 | + | |
512 | 546 | | |
513 | 547 | | |
514 | 548 | | |
515 | 549 | | |
516 | 550 | | |
517 | 551 | | |
518 | 552 | | |
519 | | - | |
| 553 | + | |
| 554 | + | |
520 | 555 | | |
521 | 556 | | |
522 | 557 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2148 | 2148 | | |
2149 | 2149 | | |
2150 | 2150 | | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
2151 | 2154 | | |
2152 | 2155 | | |
2153 | 2156 | | |
| |||
0 commit comments