Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zsh in Emacs output junk characters

Tags:

emacs

zsh

emacs23

No matter I use term or ansi-term to start zsh in Emacs, I encounter this problem, whenever I input commands, the output will have some junk characters like:

[ruby-1.9.2] ~ pwd
2;pwd1;pwd/Users/tyraeltong

the 2;pwd1;pwd is screwing the output, don't know whether others are experiencing same problem? I found a similar thread here Getting Emacs ansi-term and Zsh to play nicely but by [[ $TERM == eterm-color ]] && export TERM=xterm I still see the junk characters.

like image 624
Tyrael Tong Avatar asked Sep 21 '11 04:09

Tyrael Tong


1 Answers

Emacs doesn't play nice with ZLE, so I have this in my ~/.zshrc:

if [[ -n ${INSIDE_EMACS} ]]; then
    # This shell runs inside an Emacs *shell*/*term* buffer.
    prompt walters
    unsetopt zle
fi
like image 156
Tassilo Horn Avatar answered Oct 05 '22 09:10

Tassilo Horn