gpt4 book ai didi

windows - 是否不能在 Emacs 中将 Windows Bash 用作 shell for ssh 等?

转载 作者:可可西里 更新时间:2023-11-01 09:32:46 26 4
gpt4 key购买 nike

我试过但出现错误:进程 shell 异常退出,代码为 255。主要用于 SSH,避免使用 Cygwin 或 plink/Putty。

我在配置中有这个:

(setq explicit-shell-file-name "C:\\Windows\\System32\\bash.exe")
(setq explicit-bash.exe-args '("--noediting" "--login" "-i"))
(setenv "SHELL" shell-file-name)
(add-hook 'comint-output-filter-functions 'comint-strip-ctrl-m)

谢谢

最佳答案

我将 Bash for Windows 与最新的 Windows Creator's Update 和 Ubuntu 16.04 一起使用。它在 Visual Studio Code 和 Cmder(MobaXTerm 等 shell 应用程序)上运行良好。我也使用 ZSH 而不是 Bash(使用 oh-my-zsh 和 powerline9k),但我需要做一些调整(而且加载需要时间,但我在某处读到微软正在努力解决这个缓慢的问题)。说实话,取代Putty是个不错的办法,但是要长一点。例如,有很多网络工具无法在 WSL 上运行。

我知道准备 Cygwin 或使用 Putty 的痛苦,但您可以看看 MobaXterm,这是一个非常好的 ssh 客户端,其中包含一个包管理器,可让您从 Windows 执行很多操作。我不知道他们是否像过去那样使用 Cygwin ...但它是一个带有本地 bash shell 的现成解决方案。

为了完成这个并可能对您有所帮助,这是我在 Cmder 中运行 WSL/Bash for Windows 的启动行:bash -l -i -cur_console:p -c zsh。如果您需要更多信息,请询问 :)。

关于windows - 是否不能在 Emacs 中将 Windows Bash 用作 shell for ssh 等?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42346758/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com