Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: emulate bash key bindings



On 7 Jan 2020, at 20:37, Andrey Butirsky <butirsky@xxxxxxxxx> wrote:
> Thanks, but 'backward-kill-word' widget changes it's behavior after issuing
> "select-word-style bash" command - it starts kill bash-like words (alphabet
> and numeric symbols). So I need bindings for both type of words, bash-like
> and space-delimited.

I've never used select-word-style, i just have a handful of wrapper widgets
like this:

  dana-zle-backward-kill-word() {  # or -backward-word or whatever
    local WORDCHARS=...
    zle .backward-kill-word
  }
  zle -N dana-zle-backward-kill-word

You can set WORDCHARS to whatever you want to control the precise behaviour,
and then bind those accordingly. Not sure if that'd work for you

dana



Messages sorted by: Reverse Date, Date, Thread, Author