I'd like to unbind C-d from sending EOF in bash, and set it to another key. The idea is to keep C-d as EOF in my .bashrc
, but to rebind it in my .bash_profile
, so that hitting C-d repeatedly with pull me out of any subshells I'm in, but leave me in my login shell.
Is this possible? C-d seems to be bound to delete-char
, which it performs if there's text on the current line. It only sends EOF if there's no text on the current line. Rebinding delete-char
to, say, C-f applies the delete-char
action, but not the EOF sending.
Does Readline offer a way to rebind the EOF command?