2

I have a clean installation of openSuse. This automatically sets up bash as the default shell.

For historic reasons, all of the aliases and shortcuts I want to port from an old computer are in tcsh, and I don't really feel up to learning how to do the same in bash. Instead, I changed the login shell to tcsh, and I'm happy.

The problem I have now is that backspace only deletes forward (like the del key), instead of backward (like ctrl+h). How can I bind the backspace key to delete backwards instead of forward?

2

The shell command to change key bindings is bindkey, Backspace presumably sends byte 127 (^?; check by typing Ctrl+V then Backspace), and the edition command to delete a character backwards is backward-delete-char. So put this in your ~/.tcshrc:

bindkey '^?' backward-delete-char
0
# stty erase <press backspace key>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.