想在Windows上使用Emacs启动一个连接到MSYS2的inferior shell (M-x shell)。
我从Mastering Emacs - Running Shells in Emacs中找到了以下片段,并进行了调整:
(setq explicit-shell-file-name "D:/msys64/usr/bin/bash.exe")
(setq shell-file-name "bash")
(setq explicit-bash.exe-args '("--login" "-i")) <- Have also tried -c, and without "--login"
(setenv "SHELL" shell-file-name)
(add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m)
我得到了以下结果:
bash: cannot set terminal process group (-1): Inappropriate ioctl for device
bash: no job control in this shell
]0;~
me@computer MSYS ~
$
所以我在MSYS shell中输入了一些额外的傻瓜字符和不适当的命令,但这是进步!在Windows上使用MSYS2和Emacs将会非常棒。
csh
(pax躲避)。 - paxdiabloD:/msys64/mingw64/bin/bash.exe
是正确的路径吗?我认为找不到可执行文件是你看到的错误最有可能的原因。 - D Krueger