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

WORDCHARS (Re: Call for opinions on a couple of prospective zsh patches)

On Jun 6,  4:13pm, Peter Stephenson wrote:
} But it would be nice to have some advance on $WORDCHARS, which has always
} frustrated me (I always wanted to be able to specify characters which
} *shouldn't* be parts of words [...]).
} Perhaps, if my frustrations above are widespread, there's room for [...]

I've had this message sitting in my editor for three days now trying to
decide what to say about it.  I share some of your frustrations; I always
forget that WORDCHARS doesn't mean the opposite of what it does until I
actually want to try something with it, and then I get annoyed.

My biggest complaint is that I always want {,backward-}kill-word to treat
path components as separate words, but I usually want transpose-words to
treat entire paths as a single word.  (I tried vi-backward-kill-word, but
it stops both before and after killing each individual / character, which
drives me nuts.)  Yes, in 3.1.5-pws-* I can rewrite the widgets to do it,
but it's always seemed that it ought to be easier.  (Now that I've said
that, I note that it's probably off-topic.)

Anyway, the reason I've been staring at this for so long without answering
is that, though your WORDSTART and NONWORDCHARS suggestions are reasonable,
there's something about that approach that doesn't feel quite right.  The
trouble is, I can't think of anything better without resorting to full-
blown regular expressions (or at least glob patterns) after the manner of

The gist is that I'm with you, but not in a very helpful way just yet.

Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

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