Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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?


Note: this is a copy of this question on SuperUser that got no responses.

share|improve this question
add comment

2 Answers

up vote 2 down vote accepted

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
share|improve this answer
add comment
# stty erase <press backspace key>
share|improve this answer
    
This doesn't actually work. –  Nathan Fellman Mar 28 '12 at 22:06
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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