zsh-users
 help / color / mirror / code / Atom feed
From: Will Yardley <william@hq.newdream.net>
To: Zsh-users List <zsh-users@sunsite.dk>
Subject: Re: backward kill
Date: Thu, 15 Nov 2001 09:01:17 -0800	[thread overview]
Message-ID: <20011115090117.Z14791@hq.newdream.net> (raw)
In-Reply-To: <20011115160509.A1095@strindberg.maisel.enst-bretagne.fr>

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/


  parent reply	other threads:[~2001-11-15 17:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-15 15:05 Jesper Holmberg
2001-11-15 15:21 ` Peter Stephenson
2001-11-15 15:34   ` Mads Martin Joergensen
2001-11-15 15:40     ` Peter Stephenson
2001-11-15 15:46     ` Jesper Holmberg
2001-11-15 17:01 ` Will Yardley [this message]
2001-11-15 18:43   ` Jesper Holmberg
  -- strict thread matches above, loose matches on Subject: below --
2001-11-15 15:02 Jesper Holmberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011115090117.Z14791@hq.newdream.net \
    --to=william@hq.newdream.net \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).