From: Thomas Rast Date: Thu, 5 Feb 2009 08:28:26 +0000 (+0100) Subject: add -p: prompt for single characters X-Git-Tag: v1.6.2-rc0~1^2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/ca6ac7f1357df352fec247dc98a3e6784e6c3fea?ds=inline;hp=ca6ac7f1357df352fec247dc98a3e6784e6c3fea 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 Signed-off-by: Junio C Hamano ---