zsh-users
 help / color / mirror / code / Atom feed
* Readline-like ^W behavior
@ 2003-07-03 12:50 Haakon Riiser
  2003-07-03 13:21 ` Peter Stephenson
  0 siblings, 1 reply; 4+ messages in thread
From: Haakon Riiser @ 2003-07-03 12:50 UTC (permalink / raw)
  To: zsh-users

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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-07-03 14:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-03 12:50 Readline-like ^W behavior Haakon Riiser
2003-07-03 13:21 ` Peter Stephenson
2003-07-03 14:40   ` Haakon Riiser
2003-07-03 14:48     ` Peter Stephenson

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).