Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Readline/bash use the meta key quite often but it only works when I use the Esc-key for it. How can I configure bash/readline to accept a different key as meta?

share|improve this question
2  
This actually has nothing to do with the shell, but rather the terminal emulator. What terminal emulator are you using? (urxvt, gnome-terminal, etc) –  Patrick Aug 14 '12 at 12:30
    
I use xterm and screen. –  lelewith Aug 14 '12 at 13:34
add comment

1 Answer

This is the same question I asked I while back, so I'm not taking credit for this, but I had to put

xterm*metaSendsEscape: true
URxvt*altSendsEscape: true

in .Xresources to make Alt work as Meta in both xterm and urxvt. It is a bit contradictory, but it works. So experiment with those options. Also, I had to put

xrdb ~/.Xresources

in .xinitrc for it to work.

Edit: My question: Emacs commands in xterm

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.