Re: readline + binding; still frustrated after 4 yrs of trying --[SOLVED]

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

 



On Thu, Mar 11, 2010 at 10:12:59PM -0500, William Case wrote:
> However, and perhaps defensively, I have to blame the bash manual
> description for my difficulties.  Nowhere is there a suggestion that \e
> might be substituted for \M, if \M (Alt) isn't working as the Meta key.
> \M (Alt) does work as the Meta key in my Emacs.   In fact, all the
> examples and cursory explanations lead one away from the e\ solution and
> all the sites that I googled were substantially a repeat of the manual.

This is from the "Readline Notation" section of the bash(1) man page:

       In this section, the emacs-style notation is used to denote keystrokes.
       Control	keys  are  denoted by C-key, e.g., C-n means Control-N.  Simi
       larly, meta keys are denoted by M-key, so M-x means Meta-X.   (On  key
       boards  without a meta key, M-x means ESC x, i.e., press the Escape key
       then the x key.	This makes ESC the meta prefix.  The combination M-C-x
       means  ESC-Control-x, or press the Escape key then hold the Control key
       while pressing the x key.)

> There is no explanation of what key strokes mean e.g. a meaningful
> translation of "\eOd", "\e[1;5D", "\e[5D", etc. or a link or a suggested
> site to find further information.  As a result I had no inkling of what
> the key bindings as shown in /etc/inputrc were.

Yes, this is particularly tricky.  Most of the time you don't need to worry
about which key sequences your particular terminal is sending because of the
use of libraries like termcap or curses which hide the differences.  If you
are interested in the details you are looking for either ANSI or VT100
escape sequences.  Here's one link that details the sequences (you'll have
to do a bit more searching if you want a textual explanation).

http://ascii-table.com/ansi-escape-sequences-vt-100.php

> Thank you for the introduction to the ^V key sequence.  Where would I
> find a manual description of its use?  cat -v I had never used before
> and had to look it up in man cat.  It will remain part of my command
> repertoire.

Quoting from the bash(1) man page:

       quoted-insert (C-q, C-v)
	      Add the next character typed to the line verbatim.  This is  how
	      to insert characters like C-q, for example.
 
me
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux