Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the binding to ^D #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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