Enable backspace when ssh into a debian machine with zsh 2
As many users of mac OS X, I’ve encountered some troubles with the backspace key when ssh into a debian machine.
Reading some posts on the web, I was thinking that the problem was about the shell or the tty. But in fact it was related to zsh.
The default zsh map on debian is not correct for mac users. The solution is to tell zsh how to bind keys.
echo "bindkey ^? backward-delete-char" >> ~/.zshrc
echo "bindkey ^[[3~ delete-char" >> ~/.zshrcUse ctrl+v [key] to generate the ^... characters.
Mac OS X : properly change shell when using zsh from darwinports/macports
If like me you use a up to date zsh shell under Mac OS X installed via DarwinPorts (which change name to MacPorts) you may want to set it as your default shell.
To do this in a proper way (not by changing it in Terminal.app Preferences) you should proceed as following.
$ sudo vi /etc/shells
# add the following line :
/opt/local/bin/zsh
$chsh
# and change /bin/bash to /opt/local/bin/zsh
