Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: backward kill
- X-seq: zsh-users 4475
- From: Will Yardley <william@xxxxxxxxxxxxxxx>
- To: Zsh-users List <zsh-users@xxxxxxxxxx>
- Subject: Re: backward kill
- Date: Thu, 15 Nov 2001 09:01:17 -0800
- In-reply-to: <20011115160509.A1095@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Zsh-users List <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: New Dream Network
- References: <20011115160509.A1095@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Jesper Holmberg wrote:
> Hi all,
>
> I am using the emacs key bindings. If I've written the following:
>
> /path/to/some/file
> with the prompt at the end, and I press alt-backspace, the whole path
> is wiped out. I would like it to just remove backwards to the last
> (first from the end) slash. How could I accomplish this?
i use this bit contributed by someone on the list (Oliver Kiddle); check
the archives from Mon, Oct. 8 for more info on this:
tcsh-backward-delete-word () {
local WORDCHARS="${WORDCHARS:s#/#}"
zle backward-delete-word
}
i have it bound to control-W with:
bindkey '^W' tcsh-backward-delete-word
but you can change that obviously.
i think that's what you're looking for, no?
the '$WORDCHARS' variable is how zsh determines word boundaries so you
could add '/' to that globally, however this might affect other things
you want to leave it for, so i prefer this function.
w
--
GPG Public Key:
http://infinitejazz.net/will/pgp/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author