On Sat, 17 Jan 2009, Ludvig Ericson wrote:
On Jan 16, 2009, at 21:17, Benjamin R. Haskell wrote:
Putting a character in WORDCHARS tells Zsh to treat it as if it
ispart of a normal "word". (i.e. that it *isn't* something that
marks a word boundary.)
I very much doubt that. In my zsh, the untouched value is::
*?_-.[]~=/&;!#$%^(){}<>
I.e. pretty much the characters I expect to be word boundaries
when I hit ^W.
"Some relevant sections from the manual" or "Far more than you ever
wanted to know about WORDCHARS"
Glob Operators…
[...] Matches any of the enclosed characters.…
…named classes of characters, in the form ‘[:name:]’…
…
[:WORD:] The character is treated as part of a word; this test is
sensitive to the value of the WORDCHARS parameter
…
PARAMETERS USED BY THE SHELL…
WORDCHARS <S> [ed. '<S>' means it's "special"]
A list of non-alphanumeric characters considered part of a word
by the
line editor.
…
ZLE FUNCTIONS
Widgets…
…
The word styles available are as follows. Only the first
character
is examined.
bash Word characters are alphanumeric characters only.
normal As in normal shell operation: word characters are
alphanumeric characters plus any characters
present
in the string given by the parameter $WORDCHARS.
shell Words are complete shell command arguments,
possibly
including complete quoted strings, or any tokens
special to the shell.
whitespace
Words are any set of characters delimited by
whitespace.
default
Restore the default settings; this is usually the
same as ‘normal’.
So, I suspect you're using something other than 'normal' word style.
e.g., in my Zsh:
## Let WORDCHARS contain '.' and '/' (your 'untouched value'):
$ echo WORDCHARS
*?_-.[]~=/&;!#$%^(){}<>
$ /this/is/a/very/long/path (Ctrl+W)
^ <-- cursor
$
^
$ this is a.domain.name.example.com (Ctrl+W)
^
$
^
## So, take '.' and '/' out:
$ vared WORDCHARS
*?_-[]~=&;!#$%^(){}<>
$ /this/is/a/very/long/path (Ctrl+W)
^
$ /this/is/a/very/long/
^
$ this is a.domain.name.example.com (Ctrl+W)
^
$ this is a.domain.name.example.
^
Personally, I take '/' and '=' out (not '.').
Best,
Ben
P.S. I composed this before realizing you'd replied off-list. Feel
free to forward it to the list.