Re: need some readline tricks
20.12.2002 22:26:16, andrej hocevar <ah@siol.net> wrote:
>On Wed, Dec 18, 2002 at 03:27:42PM +0100, Michael Naumann wrote:
>> If you mean readline in bash, you can add
>>
>> "\M-[A": history-search-backward
>>
>> to your .inputrc.
>> A newly started bash should then handle CURSOR-UP the way you like.
>
>But if I add sequences that already have a meaning (like "\C-s")
>it's still the old value that's in effect.
Well \C-s is somewhat special. Usually this does not find it's way
through to readline. Use "stty -a" to see all keys getting
special treatment. \C-s by default is bound to stop (denoted with ^S).
>Besides, how do I represent function keys?
I think, they are represented just like cursor keys.
Unfortunatly (to my knowledge, which may well be incomplete), there
is no terminal independent way to denote these keys.
What you can do is:
cat -A
then press the cursor key in question and see, what sequence is issued.
Replace the ^[ (Escape) you see with \M- (Meta) for .inputrc
Merry X-Mas, Michael
Reply to: