我的默认shell是fish,我不想更改它。但在Emacs中,Tramp对鱼类效果不佳。所以我只想将bash设置为Emacs的默认shell。有可能吗?
答案 0 :(得分:6)
来自shell
函数(C-h f shell RET
)的文档:
Program used comes from variable `explicit-shell-file-name',
or (if that is nil) from the ESHELL environment variable,
or (if that is nil) from `shell-file-name'.
所以,如果你想使用" / bin / bash"作为emacs缓冲区中的shell文件,您可以:
设置变量`explicit-shell-file-name'在你的〜/ .emacs文件中:
(setq-default explicit-shell-file-name "/bin/bash")
在〜/ .profile文件中设置ESHELL环境变量:
export ESHELL=/bin/bash
设置变量`shell-file-name'在你的〜/ .emacs文件中:
(setq-default shell-file-name "/bin/bash")
答案 1 :(得分:1)
Tramp手册讲述了鱼的问题。也许你试试那里的建议:
Similar fancy prompt settings are known from the fish shell.
Here you must add in ‘~/.config/fish/config.fish’:
function fish_prompt
if test $TERM = "dumb"
echo "\$ "
else
…
end
end