Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My issue is illustrated in the follow images:

This is the visual representation I get in my iTerm of my Zsh shell, with the same font as used in Emacs:

iTerm output

This my my Emacs output using ansi-term:


I've been looking here and here... and none of the suggestions helped me.

My iTerm and Emacs does not share the same color theme, incase someone was wondering about the color difference in the screenshots.

Thanks for your help.

share|improve this question

migrated from Jun 6 '13 at 0:05

This question came from our site for professional and enthusiast programmers.

I would guess your prompt is echoing escape characters understood by iTerm but not by ansi-term. Try this: echo $PS1.

share|improve this answer
Returns no output for me. – Thomas Kobber Panum Jun 7 '13 at 18:36
OK, zsh can use another prompt, try this: echo $PROMPT and echo $RPROMPT. – Philip Kearns Jun 8 '13 at 13:52
I got this 39m$(build_prompt) %{%f%b%k%}$(build_prompt) – Thomas Kobber Panum Jun 8 '13 at 17:08
Your prompt is being set in your .zshrc, but in theory it should adapt to the terminal. Try commenting out (putting a # in front of) any mention of the prompt in .zshrc and then re-start your ansi-term. Unfortunately the prompt won't look pretty in iTerm, but should be more acceptable in ansi-term. – Philip Kearns Jun 9 '13 at 15:13
There's no mention of prompt in my zshrc. I believe it might have something to do with the official cocoa app of Emacs, doesn't support UTF-16, or something similar. – Thomas Kobber Panum Jun 14 '13 at 22:04

Your Answer


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.