summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 552ce11)
raw | patch | inline | side by side (parent: 552ce11)
author | Jean-Luc Herren <jlh@gmx.ch> | |
Wed, 26 Sep 2007 13:56:19 +0000 (15:56 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 30 Sep 2007 06:14:16 +0000 (23:14 -0700) |
Hitting Ctrl-D (EOF) is a common way to exit shell-like tools.
When in a sub-menu it will still behave as if an empty line had
been entered, carrying out the action on the selected items and
returning to the previous menu.
Signed-off-by: Jean-Luc Herren <jlh@gmx.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When in a sub-menu it will still behave as if an empty line had
been entered, carrying out the action on the selected items and
returning to the previous menu.
Signed-off-by: Jean-Luc Herren <jlh@gmx.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-add--interactive.perl | patch | blob | history |
index 7921cde8cbd3b58f1d7222e9828bf85e10f363e3..f9e9f0239295c813be26392fe1299c7fc36ee004 100755 (executable)
print ">> ";
}
my $line = <STDIN>;
- last if (!$line);
+ if (!$line) {
+ print "\n";
+ $opts->{ON_EOF}->() if $opts->{ON_EOF};
+ last;
+ }
chomp $line;
my $donesomething = 0;
for my $choice (split(/[\s,]+/, $line)) {
SINGLETON => 1,
LIST_FLAT => 4,
HEADER => '*** Commands ***',
+ ON_EOF => \&quit_cmd,
IMMEDIATE => 1 }, @cmd);
if ($it) {
eval {