bug-readline
[Top][All Lists]
Advanced

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

Re: [Bug-readline] Confused about the behaviour of bind-tty-special-char


From: Chet Ramey
Subject: Re: [Bug-readline] Confused about the behaviour of bind-tty-special-chars
Date: Tue, 06 Sep 2011 16:23:57 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.1) Gecko/20110830 Thunderbird/6.0.1

On 9/4/11 4:00 AM, Richard Michael wrote:

> Thank you very much for quick reply and clear explanation.  Is there a
> list of these defaults (or, which source file contains them)?  I offer
> to contribute them to the manual.  (Did I miss it?)

The default emacs-mode key bindings appear in the manual with the
description of the function to which they're bound.  For example:

       beginning-of-line (C-a)
              Move to the start of the current line.
       end-of-line (C-e)
              Move to the end of the line.
       forward-char (C-f)
              Move forward a character.
       backward-char (C-b)
              Move back a character.

The default vi-mode commands are the traditional bindings as defined by,
e.g., Posix:

http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sh.html#tag_20_117_13_03

> Regarding default bindings, the manual indicates many "defaults", ex.
> \C-a beginning-of-line.  These do not work out-of-the-box on my
> readline, I've had to add them to an inputrc.  How should I understand
> "default" in the documentation: "configured by the inputrc which ships
> with the readline library and may therefore be broken by a vendor on
> your system", or, "hard coded in readline" (such as above, \C-u
> unix-line-discard and \e[H beginning-of-line, etc.)?

They appear in readline's source (emacs_keymap.c, vi_keymap.c).

For kicks, I installed bash-4.2.10 and readline-6.2 on my Mac OS X 10.6.8
system, and ran bash.  I didn't test extensively, but the basic emacs
mode movement commands worked fine (C-a, C-e, C-f, C-b, M-f, M-b, etc.).

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]