VSCode集成终端不加载.bashrc或.bash_profile [英] VSCode Integrated Terminal Doesn't Load .bashrc or .bash_profile

查看:1119
本文介绍了VSCode集成终端不加载.bashrc或.bash_profile的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下文件来处理外壳配置:

I have the following files to handle shell configuration:

#~/.bash_profile
if [ -f ~/.bashrc ]; then
   source ~/.bashrc
fi

#~/.bashrc
... configure shell

如果使用code从命令行打开VSCode,则每当我添加集成shell的新实例时,就会加载.bashrc.

If I open VSCode from the command line using code, my .bashrc is loaded whenever I add a new instance of the integrated shell.

但是,如果我通过VSCode图标打开VSCode,则只会加载我的.profile.

However if I open VSCode via its icon, only my .profile is loaded.

如何确保我的.bashrc已加载?

How can I ensure my .bashrc is loaded instead?

我尝试了terminal.integrated.shellArgs.osx设置的各种设置,但没有任何运气.

I've tried various settings for the terminal.integrated.shellArgs.osx setting without any luck.

推荐答案

我在Mac上的Intellij Idea终端上遇到了同样的问题,两者的解决方案是相同的.在设置中,将集成终端的路径更改为"/bin/bash".希望有帮助.

I had the same problem with the Intellij Idea terminal on a Mac, the solution is the same for both. In settings change the path to the integrated terminal to "/bin/bash". Hope that helps.

这篇关于VSCode集成终端不加载.bashrc或.bash_profile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆