本文介绍了emacs终端中的怪异角色zsh的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于某些原因,在MacOS上使用emacs(Mx术语)中的终端时,它始终在zsh中的每一行之前发布4m的字符,并始终打印包含用户信息的2行,如

  4m  - (jesus @ laptop:/ dir)---- 
4m - (jesus @ laptop:/ dir)----
提示>

除了我只是想知道是否有办法解决这个问题之外,它比任何事情都更烦恼。在Mac OS Emacs终端模式下,我似乎也有Zsh的问题,当大量的输出被写入时,它似乎将它全部缩减到一行,并且不断覆盖同一行(可能与4m可能只是一个特殊的如果需要我可以发布.zshrc和.emacs文件。


div class =h2_lin>解决方案

您没有eterm-color terminfo。
首先,您尝试在配置文件中添加以下S-exp并进行评估。

  ;;使用Emacs terminfo,而不是system terminfo 
(setq system-uses-terminfo nil)

如果问题未解决以前的设置,您应该使用以下命令创建eterm-color terminfo
。 (terminfo路径可能与您的系统不同)

 #如果您使用Cocoa Emacs或Carbon Emacs 
tic -o〜 。min fo

When using the terminal in emacs (M-x term) under MacOS for some reason it always posts the characters 4m before every line in zsh and always prints 2 lines containing the user info such as

4m--(jesus@laptop:/dir)----
4m--(jesus@laptop:/dir)----
prompt>

It's more of an annoyance than anything but I was just wondering if there's a way to fix this. I also seem to have issues in Zsh in Mac OS emacs terminal mode when a lot of output is written to it it seems to reduce it all to one line and constantly overwrite the same line (may be related as the 4m is possibly just a special character that emacs is treating differently which can affect formatting).

If need be I can post my .zshrc and .emacs files.

解决方案

You don't have eterm-color terminfo.First, you try to add following S-exp in your configuration file and evaluate.

;; Use Emacs terminfo, not system terminfo
(setq system-uses-terminfo nil)

If problem is not resolved previous setting, you should create eterm-color terminfoby using following command. (terminfo path may different from your system)

# If you use Cocoa Emacs or Carbon Emacs
tic -o ~/.terminfo /Applications/Emacs.app/Contents/Resources/etc/e/eterm-color.ti

这篇关于emacs终端中的怪异角色zsh的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-04 17:46