From 2f8835aa0db39ab8d6387b48890f9a1125f16ae2 Mon Sep 17 00:00:00 2001 From: Tim Heaney Date: Thu, 29 Nov 2012 21:56:44 -0500 Subject: [PATCH] Remove the binding to ^D MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I keep exiting by mistake because decades of readline use (Emacs, bash, &c.) have conditioned me to type C-d to delete a character. This is another version of the C-c problem that altsql solved. I found I could just remove the binding here and C-d still exits when there's no text to delete. Everybody wins! From the readline man page       delete-char (C-d)               Delete the character at point.  If point is at the beginning  of               the  line,  there  are  no  characters in the line, and the last               character typed was not bound to delete-char, then return EOF. --- lib/App/AltSQL/Term.pm | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/App/AltSQL/Term.pm b/lib/App/AltSQL/Term.pm index 07fcf8e..858ec51 100644 --- a/lib/App/AltSQL/Term.pm +++ b/lib/App/AltSQL/Term.pm @@ -63,11 +63,6 @@ sub _build_term { kill 20, $$; # send ourselves SIGTSTP }); - $term->bindkey('^D', sub { - print "\n"; - $self->app->shutdown(); - }); - $term->bindkey('return', sub { $self->return_key }); $self->read_history();