Subject: Re: backward-kill-shell-word widget
From: Bart Schaefer <[email-masked]>
To: [email-masked]
Date: Sun, 10 Jan 2016 09:17:44 -0800
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Jan 1, 12:37am, Daniel Shahaf wrote:
}
} This widget is like ^W but for "shell words" rather than
} whitespace-separated words, so
} 
}     % echo foo "bar baz" <CURSOR>^W
}     becomes
}     % echo foo <CURSOR>

As of 5.0.8 you can do this with:

    backward-kill-shell-word() {
      zle select-in-shell-word
      ((++CURSOR))  # adjust for vi vs. emacs region
      zle kill-region
    }

I'm not sure if that CURSOR adjustment is a a bug or just a necessary
evil because of using vi binding in the emacs keymap.