【问题标题】:Running Windows bash as shell in Emacs (Spacemacs)在 Emacs (Spacemacs) 中将 Windows bash 作为 shell 运行
【发布时间】:2017-04-12 15:54:31
【问题描述】:
我正在尝试让 Spacemacs(即 Emacs)使用 Linux bash shell 的 Windows 子系统作为 shell。
我已将(setq explicit-shell-file-name "c:/Windows/System32/bash.exe") 添加到我的 .spacemacs 配置文件中,但是当我输入时:
SPC SPC ansi-term
回答是,它返回:
Spawning child process: invalid argument
【问题讨论】:
标签:
bash
shell
emacs
windows-subsystem-for-linux
spacemacs
【解决方案1】:
我认为在您的.spacemacs 文件中,您应该确保shell 层已启用,然后将此语句放入您的.spacemacs 文件中:
'((shell :variables shell-default-term-shell "c:/Windows/System32/bash.exe"))
之后,您可以通过键绑定 SPC '
调用您的 shell
【解决方案2】:
您对 .spacemacs 的配置是正确的。只需使用 SPC SPC shell 而不是 SPC SPC ansi-term 即可在 Spacemacs for Windows 中获取 bash shell。