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.

I have set up zsh to use emacs mode. But typing Alt+f or Alt+b inserts weird symbols (accented letters and so on), rather than moving around by word in the shell like it should. Since I don't ever want to insert the "ae" symbol into a shell prompt, how can I get zsh to behave?

I had the same problem with bash, but now that I'm actually taking the time to customise zsh, I thought I'd ask...

AltGr+b etc. produces different weird symbols...

I'm using Ubuntu 10.4

share|improve this question
    
Are you using gnome-terminal? –  Dennis Williamson Sep 3 '10 at 17:54
    
xterm, I believe. Is that the same thing? –  Seamus Sep 3 '10 at 18:11
    
no xterm is a program (which practically ships as part of xorg), so is gnome-terminal. gnome-terminal is an X Terminal however, and that's often abbreviated as xterm. Just to clarify any confusion –  xenoterracide Sep 3 '10 at 18:34
add comment

1 Answer 1

up vote 1 down vote accepted

It's not zsh that's misbehaving, it's xterm. The reason it's misbehaving is an obsolete setting that causes xterm to send character number x+128 when you press Alt together with character number x. The normal behavior in a text terminal is to have Alt+a send ESC a.

To tell xterm to leave 8-bit characters alone, turn off the XTerm.VT100.eightBitInput resource (despite the name, it doesn't affect what happens when you enter an 8-bit character). You'd normally do this by adding the following line to ~/.Xresources:

XTerm.VT100.eightBitInput:      false

~/.Xresources is read when you log in in most unix distributions. To read it immediately, run the command

xrdb -merge ~/.Xresources
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.