Skip to content

Conversation

@oylenshpeegul
Copy link

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!

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant