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

On Jan 10,  7:53pm, Daniel Shahaf wrote:
}
} Bart Schaefer wrote on Sun, Jan 10, 2016 at 09:17:44 -0800:
} > 
} >     backward-kill-shell-word() {
} >       zle select-in-shell-word
} >       ((++CURSOR))  # adjust for vi vs. emacs region
} >       zle kill-region
} 
} I'd add:
}         LBUFFER+=" "
} 
} Without that, LBUFFER[-1] after the widget is the last character of the
} preceding word.

If you don't kill the space, select-in-shell-word won't identify the
correct word on a repeated call.

Other problems I've noted with this approach are that multiple calls
add to the kill ring but do not append to CUTBUFFER, and that this
kills the whole word under the cursor not just the part to the left.

So it needs some work.