如何为ansi-term/multi-term加载别名和环境变量?

hat*_*rix 4 emacs

我是否必须设置类似.emacs.d/init_bash.sh(如shell模式),或者它可以~/.bash_profile直接读取我的内容吗?如果是后者,如何设置配置ansi-term/multi-term以在启动时自动获取此文件?

Boz*_*sov 8

仅自动登录shell源.bash_profile.常规shell源只有.bashrc.但是,这通常不是问题,因为所有shell通常都是从登录shell生成的,因此继承了它的环境.当我使用ansi-term时,它不需要我的部分和功能,就像使用gnome-terminal打开的终端一样.