Visual Studio 集成终端 bash 错误

Ste*_*is_ 3 bash visual-studio visual-studio-code

我正在尝试在 VCS 中使用集成终端,但它不喜欢我的bash_profile脚本。

我收到以下错误(添加了相应的代码)-

bash: parse_git_branch: command not found
parse_git_branch() {
     git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}

bash: work: command not found 
alias work="cd ./blah"
Run Code Online (Sandbox Code Playgroud)

我不确定为什么它不能在 VCS 中工作,但可以在 Iterm2 和终端中正常工作。

Rob*_*ens 5

您是否在设置"terminal.integrated.shellArgs.osx": ["-l"]中进行了设置,以便它运行您的bash_profile?