I am using zsh and i m having a hard time with the keybindings for the DELETEbutton. So for example i would like to use a command from my .zsh_history. To do so i hit the up button. If i now want to modify the command sightly i jump to the first position and hit the DELETEkey. But instead of deleting the first char it turn the first three characters to upper case, like:

vim .zsh.rc
VIM .zsh.rc

(the dash should represent the cursor position) Special characters are not affected by this.

I tried to add bindkey "e[3~" delete-char and [[ -n ${key[Delete]} ]] && bindkey "${key[Delete]}" delete-char to my zsh.rc but the DELETE key is not really impressed. Any suggestions?


The second I posted it, I saw my mistake - I forgot a backslash.

So I changed:

bindkey "e[3~" delete-char 


bindkey "\e[3~" delete-char 

and it worked.


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.