我是否必须设置类似.emacs.d/init_bash.sh (对于shell模式),或者它可以直接读取我的~/.bash_profile吗? 如果是后者,如何设置配置ansi-term / multi-term以在启动时自动获取此文件?
Do I have to set up something like .emacs.d/init_bash.sh (as for shell-mode), or can it read my ~/.bash_profile directly? If the latter, how do I set configure ansi-term/multi-term to source this file automatically on start-up?
最满意答案
仅自动登录shell源.bash_profile。 常规shell源只有.bashrc。 但是,这通常不是问题,因为所有shell通常都是从登录shell生成的,因此继承了它的环境。 当我使用ansi-term时,它不需要我的部分和功能,就像使用gnome-terminal打开的终端一样。
Only login shells source .bash_profile automatically. Regular shell source only .bashrc. This shouldn't regularly be a problem, however, since all shells are usually spawned from the login shell and therefore inherit its environment. When I use ansi-term it requires no additional setup on my part and functions just like a terminal opened with gnome-terminal, for instance.
更多推荐
发布评论