zsh-users
 help / color / mirror / code / Atom feed
From: Haakon Riiser <haakon.riiser@fys.uio.no>
To: zsh-users@sunsite.dk
Subject: Readline-like ^W behavior
Date: Thu, 3 Jul 2003 14:50:04 +0200	[thread overview]
Message-ID: <20030703125004.GA1792@s.chello.no> (raw)

Is it possible to make ^W delete the word to the left of the cursor
with the same word-boundary rules as in readline/bash?  Here's what
I'm looking for:

    bash$ ls foo-bar | wc^W
=>  bash$ ls foo-bar | ^W
=>  bash$ ls foo-bar ^W
=>  bash$ ls ^W
=>  bash$

I currently have ^W bound to "backward-kill-word" in zsh 4.1.1,
and it behaves like this:

    zsh% ls foo-bar | wc^W
=>  zsh% ls foo-bar | ^W
=>  zsh% ls ^W
=>  zsh%

As you can see from the above, the problem is that the second ^W
delets both the "|" and the word before it.  This is apparently how
the "werase" character works in canonical mode (Linux 2.4.x), though
I can't imagine why -- does it consider "|" a whitespace character?

I've also tried "vi-backward-kill-word", but it's too weak:

    zsh% ls foo-bar | wc^W
=>  zsh% ls foo-bar | ^W
=>  zsh% ls foo-bar ^W
=>  zsh% ls foo-^W
=>  zsh% ls foo^W
=>  zsh% ls ^W
=>  zsh%

Have I overlooked a function that corresponds to the readline
"unix-word-rubout" function?

-- 
 Haakon


             reply	other threads:[~2003-07-03 12:50 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-03 12:50 Haakon Riiser [this message]
2003-07-03 13:21 ` Peter Stephenson
2003-07-03 14:40   ` Haakon Riiser
2003-07-03 14:48     ` Peter Stephenson

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=20030703125004.GA1792@s.chello.no \
    --to=haakon.riiser@fys.uio.no \
    --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).