I want to use ALT + d in shell terminal to be able to kill a word.
The problem is that if I use national characters, namely cyrrilics, after pressing ALT + CyrChar I get a CyrChar on my tuned xterm and unprintable symbol on gnome terminal.
I know that it is possible to rebind this functionality to some CTRL combination, say CTRL + d with bind '"\C-d":shell-kill-word', which will work in national mode too, but is there a way to make ALT + CyrChar work similar to ALT + US-ASCII?
First, enter CTRL+V ALT+CyrChar in your shell. You should see something like “^[foo”. The “foo” part is what bash sees when you press ALT+CyrChar. Then use
bind '"\efoo":kill-word'to bind that to the kill-word command. Make sure you replace foo with exactly what follows the^[.For example to bind ALT+DELETE to kill-word, I would use
bind '"\e[3;3~":kill-word'since CTRL+V ALT+ prints^[[3;3~.