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

Re: backward-kill-word behavior



Clint Adams wrote:
> I am inundated with messages about how backward-kill-word
> doesn't behave as in bash.  Can something be put into
> the FAQ?

I suppose you mean that it uses $WORDCHARS instead of just alphanumeric
characters.  There are various other points about this.

We can supply functions that do this.  The deletion is a trivial one-line
parameter substitution.  However, pushing the deleted part onto the kill
ring appears to be rather harder.  You can manipulate point and mark, but
that messes up the user's state.  Is it really impossible to do this as the
internals do, or have I missed something?  If the former, then an extra
option to zle to do what killing does with a string would be simple and
sensible, and then we can write compatibility functions like this quite
easily.

Sometime ago I mentioned I didn't like the way $WORDCHARS worked and would
rather be able to list things which weren't part of words.  Now, however, I
think doing this with functions is probably a better way to go.  If we add
the kill feature, does anybody want to cobble a few functions with more
configurable wordiness, possibly defaulting to bash behaviour, together?
Else I do it myself.

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Work: pws@xxxxxxx
Web: http://www.pwstephenson.fsnet.co.uk



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