如何为 emacs tramp 指定要打开的远程 shell?

Dmi*_*yal 6 bash zsh shell emacs tramp

除了打开远程文件,tramp 还可用于运行远程 shell。不幸的是,有一个问题。在本地机器上我有 zsh,而在远程服务器上只安装了 bash。发出 Mx shell 会导致exec: 24: /bin/zsh: not found消息。

我可以以某种方式调整流浪汉来运行 bash 吗?

leg*_*cia 3

尝试一下——从现在开始M-x set-variable RET explicit-shell-file-name RET "/bin/bash"RET应该使用 bash。M-x shell不确定是否有一种简单的方法可以根据您使用的机器进行切换......