You are not logged in.

#1 2017-11-24 09:10:28

sakishrist
Member
Registered: 2012-03-04
Posts: 42

Make zsh [CTRL+W] behave like bash

Hello,

I am trying to configure my zsh to split words like bash when it comes to CTRL-W.

I have tried the following that I found around the nets with many variations:

my-backward-delete-word() {
    local WORDCHARS=" "
    zle backward-delete-word
}
zle -N my-backward-delete-word
bindkey '^W' my-backward-delete-word

Unfortunately, it seems like zsh is ignoring WORDCHARS altogether. If I echo $WORDCHARS, it returns nothing, even if I do the echo in that function. The binding is working though, since the echo outputs anything else I put in there.

Any ideas on what would be the issue?

Thanks!

Offline

Board footer

Powered by FluxBB