bash key binding problem

bash key binding problem

Post by Michael Heow Eide Goodm » Sat, 01 Aug 1998 04:00:00



I have been having trouble binding CTRL-left to backward-word.

The obvious key binding does not work:
  $ bind '"\C-\e[D":backward-word'

Neither does adding in various Meta combinations even after setting up
the (8 bit) meta flags.

Anyone know how to set this up in bash?

Thanks!
- Michael Heow Eide-Goodman

 
 
 

bash key binding problem

Post by Andreas Schwa » Tue, 04 Aug 1998 04:00:00



|> I have been having trouble binding CTRL-left to backward-word.
|>
|> The obvious key binding does not work:
|>   $ bind '"\C-\e[D":backward-word'
|>
|> Neither does adding in various Meta combinations even after setting up
|> the (8 bit) meta flags.
|>
|> Anyone know how to set this up in bash?

First you have to check what sequence of character CTRL-left actually
emits.  Then put that sequence into the bind command.

--
Andreas Schwab                                      "And now for something



 
 
 

1. bash key-binding problem

I recently started using xdm to start X off, rather than startx.
However, without changing any of my bash start-up files, I now get a
different set of key-bindings under bash:

startx                                  xdm
------------                            ------------

"\C-c" == self-insert                 (nothing)
"\e-Backspace" = backward-kill-word   ??

Anyone know what on earth is going on? I suspect something funny in
the startup procedure, but can't fathom what. I'm using SLS 1.02,
XFree-1.2 (bash/X/xdm/... from those). My .xsession and .xinitrc files
are identical (.xsession is a link to .xinitrc).

Perhaps related to (some of) the above, my 'Delete' key by default
produces ^H under X. To get it to work properly in emacs, I had the
following xmodmap in my .xinitrc (keycode 22 is my Delete key):

         xmodmap -e "keycode 22 = Delete"

This worked for both emacs and bash when X was started with startx,
but with xdm bash sees the Delete key as an 'abort' or '^C' like key -
prints a new prompt, ignoring all previously typed input - and I can't
figure out quite what is going on.

__________________________________________________________________________

2. Help compiling DOSEMU

3. BASH BASH BASH BASH BASH BASH BASH BASH BASH BASH

4. Leafnode problems

5. key binding in bash

6. ** Problem with Netscape LiveWire/NT and Oracle 7.2 **

7. bash key binding

8. RDIST - permission denied when updating host

9. Setting bash key bindings in .inputrc

10. Key Bindings in bash

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

12. bash command line editing with vi key bindings

13. reconfiguring key bindings in bash -- help