Interrpreting modifier codes in /etc/inputrc ?? -- [SOLVED]

Steven W. Orr steveo at syslang.net
Fri Aug 7 20:27:37 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 08/07/09 09:30, quoth William Case:
> Hi;
> 
> I solved all my readline problems in .bashrc with
> export INPUTRC='/etc/inputrc'.  Before I feel too sheepish ...

Let me stimulate your need for feeling sheepish.

* Never set an environment variable in your .bashrc  Instead, set it in your
.bash_profile.

* If you say export INPUTRC=/etc/inputrc in your .bash_profile then you will
bypass any additions that you might want to add for yourself personally. By
default, the ~/.inputrc is read already, so better would be to say in your
~/.inputrc:

$include /etc/inputrc
and then add any extras you personally may have.

* Note that the export statement in your .bashrc should not have the pathname
in single quotes. It doesn't hurt but it doesn't do you any good either since
it's inherently a single word. Try to reserve the single quotes to create a
value that may have multiple words and the double quotes for when  you have
variable interpolation.


> 
> On Thu, 2009-08-06 at 13:13 -0400, William Case wrote:
>> Hi;
>>
>> I have the following codes in my readline inputrc:
>>
>> # for linux console and RH/Debian xterm
>> "\e[1~": beginning-of-line
>> "\e[4~": end-of-line
>> "\e[5~": beginning-of-history
>> "\e[6~": end-of-history
>> "\e[3~": delete-char
>> "\e[2~": quoted-insert
>> "\e[5C": forward-word
>> "\e[5D": backward-word
>> "\e[1;5C": forward-word
>> "\e[1;5D": backward-word
>> ... etc.
>>
>> Is there a tutorial or manual that explains or shows what those modifer
>> codes mean.  That is, I know "\e" must mean ESC key but what does the
>> various other codes (e.g. "[1~") mean -- for sure. 
>>
>> I have read the ReadLine manual, and tried Xev and xmodmap -pm -pk with
>> no elucidation.
> 
> The readline manual says:
> 
>         "1.3 Readline Init File 
>         The name of this file is taken from the value of the environment
>         variable INPUTRC. If that variable is unset, the default is
>         `~/.inputrc'. If that file does not exist or cannot be read, the
>         ultimate default is `/etc/inputrc'."
> 
> Doesn't that sentence seem to say that if the INPUTRC environmental
> variable is not set, readline ultimately defaults to '/etc/inputrc'.  I
> wanted it to default to '/etc/inputrc' so I left it unset!  It never
> dawned on me that I would have to export or set it to the default first.
> It is sort of contrary to what default means -- isn't it?
> 


- --
Time flies like the wind. Fruit flies like a banana. Stranger things have  .0.
happened but none stranger than this. Does your driver's license say Organ ..0
Donor?Black holes are where God divided by zero. Listen to me! We are all- 000
individuals! What if this weren't a hypothetical question?
steveo at syslang.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.10 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkp8jjkACgkQRIVy4fC+NyTZJwCeOZAoT+NqxY4pM28M2wcyK5OJ
Ef0AnAt4r46UIlcEm0VQmKlldUlBu4nk
=xd1U
-----END PGP SIGNATURE-----




More information about the fedora-list mailing list