How to avoid accidental shell logouts ?

Sometimes I am too quick at typing several CTRL+D to quit sub-shells and I logout from my terminal session, is there a way to avoid that ?
In C shell or assimilate (csh and tcsh) you can type (or insert in ~/.cshrc or ~/.tcshrc)
set ignoreeof
Now when typing ctrl D, instead of trminating the session, you will get the message Use "logout" to logout.