我认为源自登录 shell 的 .bash_profile(或 .profile)中的任何内容都可以在交互式 shell 中使用。
我的目标是在登录 shell 或交互式 shell 中提供可用的函数列表。
我使用的是 Ubuntu 14.04.1,并且我不使用 .profile,而是使用 .bash_profile。(.profile 已重命名)
所以目前我所做的,我已将函数插入 .bash_profile 中,但是当打开交互式终端时,只有当我使用 .bash_profile 时,它们才不可用bash -l
。