I know how to disable ctrl-D by
set -o ignoreeof, which applies when logged in over ssh as well.. But I only want to disable it when it is about to quit a local shell. How can I then?
In interactive bash shell, ctrl-d is used to delete characters in front, and to indicate the end of stdin input, and also makes bash quit.
Sometimes when I delete characters in front by ctrl-d, I hold the keys too long, and accidentally make bash quit. How can I prevent accidentally making bash quit?