我希望在VSCode终端中运行source ~/.bashrc
,这样我就可以加载自己的命令并在其中运行,目前我必须在命令行上手动执行。是否有办法在终端启动之前运行该命令?(操作系统:Mac)
我希望在VSCode终端中运行source ~/.bashrc
,这样我就可以加载自己的命令并在其中运行,目前我必须在命令行上手动执行。是否有办法在终端启动之前运行该命令?(操作系统:Mac)
由于您使用的是 macOS,因此不会使用 ~/.bashrc
文件,而是使用 ~/.bash_profile
。您可以执行以下操作之一:
~/.bash_profile
, orSource your ~/.bashrc
from your ~/.bash_profile
:
Create a file ~/.bash_profile
with the following content:
source ~/.bashrc
Give the new file the same permissions as ~/.bashrc
~/.bash_profile
中... - nwinklersource ~/.bashrc
这样的东西。 - Peak Sornpaisarn