add -p: prompt for single characters
authorThomas Rast <trast@student.ethz.ch>
Thu, 5 Feb 2009 08:28:26 +0000 (09:28 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 Feb 2009 01:44:10 +0000 (17:44 -0800)
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>
No differences found