Commit ca6ac7f
add -p: prompt for single characters
Use Term::ReadKey, if available and enabled with interactive.singlekey,
to let the user answer add -p's prompts by pressing a single key. We're
not doing the same in the main 'add -i' interface because file selection
etc. may expect several characters.
Two commands take an argument: 'g' can easily cope since it'll just
offer a choice of chunks. '/' now (unconditionally, even without
readkey) offers a chance to enter a regex if none was given.
Signed-off-by: Thomas Rast <trast@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>1 parent 68c02d7 commit ca6ac7f
2 files changed
+48
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1000 | 1000 | | |
1001 | 1001 | | |
1002 | 1002 | | |
| 1003 | + | |
| 1004 | + | |
| 1005 | + | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
1003 | 1010 | | |
1004 | 1011 | | |
1005 | 1012 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
36 | 44 | | |
37 | 45 | | |
38 | 46 | | |
| |||
758 | 766 | | |
759 | 767 | | |
760 | 768 | | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
| 779 | + | |
| 780 | + | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
761 | 790 | | |
762 | 791 | | |
763 | 792 | | |
764 | 793 | | |
765 | | - | |
| 794 | + | |
766 | 795 | | |
767 | 796 | | |
768 | 797 | | |
| |||
893 | 922 | | |
894 | 923 | | |
895 | 924 | | |
896 | | - | |
| 925 | + | |
897 | 926 | | |
898 | 927 | | |
899 | 928 | | |
| |||
966 | 995 | | |
967 | 996 | | |
968 | 997 | | |
969 | | - | |
| 998 | + | |
970 | 999 | | |
971 | 1000 | | |
972 | 1001 | | |
| |||
1018 | 1047 | | |
1019 | 1048 | | |
1020 | 1049 | | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
1021 | 1058 | | |
1022 | 1059 | | |
1023 | | - | |
| 1060 | + | |
1024 | 1061 | | |
1025 | 1062 | | |
1026 | 1063 | | |
| |||
0 commit comments