Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Bashing away at Unix



On 15/03/2008, SL Baur <steve@example.com> wrote:

> On 3/14/08, Josh Glover <jmglov@example.com> wrote:
>
>  >  Firstly, how do I make ^H-Backspace delete a word like it does in
>  >  bash?
>
> Try backward-kill-word, which is bound by default to C-w, ESC-C-h and
>  ESC-C-? in emacs line editing mode.

C-w backward-kills a word in bash as well, but that would kill the
entire path, rather than just the last component. ESC-Backspace is a
GNU readline thing, I guess; it works the same way in the Perl
debugger and other programs that use GNU readline.

Googling...

http://tiswww.case.edu/php/chet/readline/rluserman.html#SEC17

Searching for "ESC" reveals:

prefix-meta (ESC)
    Metafy the next character typed. This is for keyboards without a
meta key. Typing `ESC f' is equivalent to typing M-f.

Ah sou... searching for "M-DEL" now tells me:

M-DEL
    Kill from the cursor the start of the current word, or, if between
words, to the start of the previous word. Word boundaries are the same
as those used by M-b.

Bugger! What about M-b?

backward-word (M-b)
    Move back to the start of the current or previous word. Words are
composed of letters and digits.

Any of this spew help you to recognise whether zsh has an analogue?

>  Reason #24 to like zsh:
>  There isn't much regarding the command line editing that is hardcoded.
>  In particular, you can redefine any key to do pretty much exactly what
>  you want.

This is a very good reason indeed, and is in fact the reason that I
use Open Source software in the first place: so my software can do
what *I* want, not what it wants.

-- 
Cheers,
Josh


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links