Emacs 中的 zsh 输出垃圾字符
无论我在Emacs中使用term还是ansi-term启动zsh,我都会遇到这个问题,每当我输入命令时,输出都会有一些垃圾字符,例如:
[ruby-1.9.2] ~ pwd
2;pwd1;pwd/Users/tyraeltong
2;pwd1;pwd
正在搞砸输出,不知道其他人是否也遇到同样的问题?我在这里找到了类似的线程 让 Emacs ansi-term 和 Zsh玩得很好但是通过[[ $TERM == eterm-color ]] && export TERM=xterm
我仍然看到垃圾字符。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
Emacs 与 ZLE 配合得不好,所以我在 ~/.zshrc 中有这个:
Emacs doesn't play nice with ZLE, so I have this in my ~/.zshrc:
找到了解决方案在前面提到的相关帖子
简而言之,在emacs中
Mx package-install
并安装多术语。Mx multi term
启动一个 shell,所有的铃声和提示都已启动。 oh-my-zsh 提供的口哨声Found the solution in the related post mentioned earlier
In a nutshell, in emacs
M-x package-install
and install multi-term.M-x multi-term
kicks off a shell, with all the bells & whistles oh-my-zsh has to offer它可能是具有 bash 语法的错误 PROMPT_COMMAND。尝试:
看看是否有帮助。
It could be an erronious PROMPT_COMMAND that has bash syntax. Try:
and see if that helps.