I recently read Running Shells in Emacs, and spend some time to adapt my elaborate Zsh prompt to work with the limited capabilities of
M-x shell and
Following this effort I'm now finally able to use Zsh from within Emacs, however there is an—albeit minor—nuisance with
M-x ansi-term. I always see the stray text
4m before the prompt.
As you can see, this phenomenon seems to be independent of the actual prompt theme. It also appears with any of the built-in prompts, even the simple ones that don't use any fancy control characters. As a matter of fact, it even happens with the default prompt, i.e. if I start Zsh without my
Well, it's really just a minor nuisance, and I wouldn't not really mind if I weren't able to get rid of it—I mostly prefer
M-x shell anyway, where this issue does not occur.
But it really annoys me that I haven't been able to find the cause of this issue, even though I really tried to debug it. I must say, though, that my understanding of terminals is rather limited, so I might have missed the very obvious.
I'm on OS X 10.10. My Emacs is 25.0.50, build straight from trunk with Homebrew, and no special flags. Zsh is 5.0.5, as included with Yosemite, but the issue also occurs with 5.0.7 installed via Homebrew.
Can anyone shed a light on this issue?