From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20368 invoked from network); 15 Nov 2001 17:01:48 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 15 Nov 2001 17:01:48 -0000 Received: (qmail 6817 invoked by alias); 15 Nov 2001 17:01:27 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4475 Received: (qmail 6802 invoked from network); 15 Nov 2001 17:01:24 -0000 Date: Thu, 15 Nov 2001 09:01:17 -0800 From: Will Yardley To: Zsh-users List Subject: Re: backward kill Message-ID: <20011115090117.Z14791@hq.newdream.net> Mail-Followup-To: Zsh-users List References: <20011115160509.A1095@strindberg.maisel.enst-bretagne.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011115160509.A1095@strindberg.maisel.enst-bretagne.fr> User-Agent: Mutt/1.3.23i Organization: New Dream Network 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/