簡體   English   中英

MSYS2 下級 shell 在 Emacs 在 Windows

[英]MSYS2 inferior shell in Emacs on Windows

嘗試在連接到 MSYS2 的 Emacs 上的 Emacs 中啟動劣質的 shell(Mx shell)。

我從Mastering Emacs - Running Shells in Emacs Mastering 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 會很棒。

問題是 Bash 的-i 。這意味着交互式,因此 Bash 嘗試使用ioctl配置終端,這對於本機 Windows Emacs 是無意義的。當您使用 MSYS2 時,在本機 Emacs 中剝離-i Bash

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM