author | Thomas Rast <trast@student.ethz.ch> | |
Thu, 5 Feb 2009 08:28:26 +0000 (09:28 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Fri, 6 Feb 2009 01:44:10 +0000 (17:44 -0800) | ||
commit | ca6ac7f1357df352fec247dc98a3e6784e6c3fea | |
tree | accae1f69d9cfdba6e4b7e5a1e55bb1c1c4de86f | tree | snapshot |
parent | 68c02d7c462e1748578209346f050a587c040139 | commit | diff |
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>
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>
Documentation/config.txt | diff | blob | history | |
git-add--interactive.perl | diff | blob | history |