?
Solved

bind keys  bash

Posted on 2004-08-01
11
Medium Priority
?
555 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 150 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

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…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

649 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