altsql-shell icon indicating copy to clipboard operation
altsql-shell copied to clipboard

Remove the binding to ^D

Open oylenshpeegul opened this issue 12 years ago • 0 comments

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.

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.

So C-d deletes when I need it to and exits altsql on a blank line. Everybody wins!

oylenshpeegul avatar Nov 30 '12 03:11 oylenshpeegul