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

Re: kill-word & friends in ZLE



On May 16,  2:00pm, Hrvoje Niksic wrote:
} Subject: Re: kill-word & friends in ZLE
}
} In your mail, you said:
} [...]
} > Another satisifactory option would be something like "yank-word", so I
} > could yank back the most-recently-killed word, rather the whole line,
} 
} Why don't you use C-y? This works for me:
} fly% ls foo bar[Esc-Backspace][C-y]
} erases and returns bar on the line.

Yes, but:

% ls foo bar[esc-backspace][esc-backspace][c-y]

erases and then returns "foo bar".  What I want to do is erase "foo bar"
and then return only "foo".  "Undo" is the closest approximation.

} Furthermore, all the kills enter the
} kill-ring and are reaccessible.

Doesn't help, because "foo" isn't in the kill ring all by itself, it's
in the same kill-ring entry with "bar".

On May 16, 10:56am,  (Mike Kazda) wrote:
} Subject: Re: kill-word & friends in ZLE
}
} I tried setting the following in zsh (beta17) and it had no effect:
} 
} WORDCHARS='*?_-.[]~=/&;!#$%^(){}<>'
} 
} Do you have any hints?

WORDCHARS has always bugged me because it does NOT specify characters that
are word *breaks*, it specifies characters *in addition to alphabetics and
numerals* that are *included* in words.

So you need to *remove* characters from WORDCHARS to get them to be taken
as word breaks.  That's why this thread started with a patch to default
WORDCHARS to nothing at all.

-- 
Bart Schaefer                     Vice President, Technology, Z-Code Software
schaefer@xxxxxxxxxx                  Division of NCD Software Corporation
http://www.well.com/www/barts           http://www.ncdsoft.com/ZMail/




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