bash key binding

bash key binding

Post by Vinod Gupt » Thu, 16 Sep 1999 04:00:00



I bind some keys (Home, End,...) in my .bashrc, like:

bind '"\e[1~": "grep -i "'

But annoyingly these keys get rebound to beginning-of-line etc.
by the time bash returns prompt. Of course, I can rebind by
. .bashrc

This problem has come up only after I upgraded from RH5.2 to RH6.0
How can I tell bash to respect my key bindings at first place?

Vinod.

 
 
 

bash key binding

Post by Chet Ram » Thu, 16 Sep 1999 04:00:00




Quote:>I bind some keys (Home, End,...) in my .bashrc, like:

>bind '"\e[1~": "grep -i "'

>But annoyingly these keys get rebound to beginning-of-line etc.
>by the time bash returns prompt. Of course, I can rebind by
>. .bashrc

>This problem has come up only after I upgraded from RH5.2 to RH6.0
>How can I tell bash to respect my key bindings at first place?

Either unset INPUTRC or rename /etc/inputrc.  The /etc/inputrc
Red Hat ships with 6.0 is badly broken.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)



 
 
 

bash key binding

Post by Klaus Alexander Seistr » Thu, 16 Sep 1999 04:00:00



> I bind some keys (Home, End,...) in my .bashrc, like:

> bind '"\e[1~": "grep -i "'

> But annoyingly these keys get rebound to beginning-of-line etc.
> by the time bash returns prompt.

You want to put it in your ~/.inputrc instead:

        "\e[1~": "grep -i "

etc. (no `bind').

Cheers,

  //Klaus

--
[ Magnetic Ink ] ><>
[ http://www.magnetic-ink.dk/download/ ]

 
 
 

1. Setting bash key bindings in .inputrc

I am trying to set some keys in my .inputrc file under bash.  I noticed that my
<End> key translates into the sequence "^[[\220", or 'escape', '[', and then
some character which has an octal code of 220.  The code 220 is beyond the
ASCII limit of 128 (base ten).  I think bash is seeing this sequence as \020,
or Ctrl-P, since maybe it can only handle 7 bit ASCII characters and is
assuming the most significant bit is always 0.  Anyone else tackled this
problem?  I'm running Linux on a Micron, and I haven't gotten used to the
keybindings on the PC yet.  I would appreciate any help.

  Thanks,
  Russell Neufeld

2. Multiuser Chat??

3. bash key binding problem

4. Docs on PPP (0/1)

5. Bash key bindings

6. Web Server confusion

7. bash - key bindings

8. Please help, i need major help, i cant boot into mandrake linux 8.1

9. bash key-binding problem

10. BASH BASH BASH BASH BASH BASH BASH BASH BASH BASH

11. key binding in bash

12. Key Bindings in bash

13. How do I bind a function key in Bash?