cygwin bash在emacs shell中无法正确显示

jil*_*luo 21 emacs bash cygwin

我正在尝试使用emacs进行cygwin.我的环境是Windows 7 x64,emacs-24.0.93.1,cygwin 2.769,系统编码是gbk,cygwin的编码系统默认为utf-8,而emacs的编码系统默认为gbk

我用setup- cygwin用emacs设置cygwin.我可以使用cygwin bash启动emacs shell.但是我遇到了两个问题.首先,在bash开始时有两个警告

bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
Run Code Online (Sandbox Code Playgroud)

其次,在bash响应之后,出现了一些奇怪的字符. 在此输入图像描述

有谁知道发生了什么?

har*_*rpo 1

将其添加到您的初始化中:

(add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
Run Code Online (Sandbox Code Playgroud)

至于你的其他信息,我最近才开始收到。我已经运行 emacs/cygwin/bash 一段时间了,但我还不确定是什么原因造成的。