Solved

bind keys  bash

Posted on 2004-08-01
11
543 Views
Last Modified: 2013-12-09
Hi,

I want to use bash but when opening an xterm I have quite a lot of key missing/disfunctioning :

PageUPand PageDown keys don't work
Del key behaves like backspace, which I'd like to act as a Del key of course

I managed to make it work with zsh using bindkey, do you know how to do that with bash ?

Cheers
0
Comment
Question by:mikygee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
11 Comments
 
LVL 62

Expert Comment

by:gheist
ID: 11688920
Please post output of:
uname -a
xterm -v
bash --version
tset -
to better sort out what your environment is and to provide exact solutions

bash uses readline library for all input handling, so please read "man readline" manual page to adjust key mappings
0
 
LVL 2

Author Comment

by:mikygee
ID: 11689317
$ uname -a
OpenBSD laptop.noos.fr 3.5 GENERIC#34 i386

$ bash --version
bash --version
GNU bash, version 2.05b.0(1)-release (i386-unknown-openbsd3.5)
Copyright (C) 2002 Free Software Foundation, Inc.

$ tset -
tset -
xterm

xterm -v
Doesn't work

I have tried a couple of things after reading man realine but without any success.

I had already succeded in muting the bell but no success with keybinding
0
 
LVL 62

Expert Comment

by:gheist
ID: 11691296
Up to my understanding
\b: \d
\d: \b
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 2

Author Comment

by:mikygee
ID: 11695764
bind "\d":delete-char doesn't work, nor bind "\b":delete-char
bind DEL:delete-char works but it makes also backspace to do the same thing as DEL and I don't want that.
Can't find the good keybinding for the Insert key as well
0
 
LVL 62

Expert Comment

by:gheist
ID: 11701965
not bind x y
but ~/.inputrc file is for readline config
0
 
LVL 2

Author Comment

by:mikygee
ID: 11710622
I copied
\b: \d
\d: \b
in .inputrc and it didn't solve the problem
0
 
LVL 62

Accepted Solution

by:
gheist earned 50 total points
ID: 11714595
try ksh, it has syntax like other Korn Shells, like bash2, has autocomplete and history browsable with arrows etc.
since bash is not statically linked it will not work in single user mode etc (do not even dream of running bash as root-s shell)
0
 
LVL 2

Author Comment

by:mikygee
ID: 11718272
I tryed lots of combinations, but it doesn't make any difference between DEL et RUBOUT keys.
I use zsh for my root account and I think I will stick with that shell for my other users in the future.
There is one thing  I don't understand is why bash runs so well under linux and pissing me off under openbsd.
0
 
LVL 2

Author Comment

by:mikygee
ID: 11718324
Thanx for help
0
 
LVL 62

Expert Comment

by:gheist
ID: 11719845
I did as root chsh and set ksh instead of csh, works fine still, just pressed DEL, yes it does not work, but anyway editing is possible with backspace in either xterm from putty vt220 from vandyke securecrt or vt220/vt100 form default console
0
 
LVL 62

Expert Comment

by:gheist
ID: 11719978
file `which bash`
file `which csh`
file `which ksh`
for more information - i.e. - bash will need /usr mounted to work
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Vmware Vswitch  VS  Redhat  Bridge 1 120
Oracle Finace 3 95
Best way to split and output to csv in bash 2 75
insert flat files in to tables based upon first character 1 31
A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question