Ale*_*hel 11 bash intellij-idea
我.bashrc在我的Intellij IDEA终端上使用了一些别名.为什么.bashrc不采购?
小智 16
IntelliJ 也有同样的问题。\n通过设置值\xc2\xa0 /bin/bash --login\xc2\xa0in解决了这个问题setting->Tools->Terminal->Shell path。
/bin/bash --login\xc2\xa0 强制 bash 读取~/.bash_profile.
Kyl*_*and 10
.bashrc仅在Bash以“交互”模式运行时才加载。由于某些原因,IntilliJ默认以非交互模式运行Bash,但这很容易更改。打开IntelliJ设置窗口,然后打开“工具->终端”,并添加-i到Shell路径。
(请注意,在此屏幕截图中,我还更改了默认外壳程序,因为我在Mac上,这使得更新变得困难/bin/bash。除非您安装了其他版本的Bash,否则请勿盲目复制此更改!)
对我来说,改变线路
Exec="/opt/idea-IU-183.4284.148/bin/idea.sh" %f
Run Code Online (Sandbox Code Playgroud)
到
Exec=bash -ic "/opt/idea-IU-183.4284.148/bin/idea.sh" %f
Run Code Online (Sandbox Code Playgroud)
工作。我们利用交互式 shell 加载的 hack .bashrc:)
在Mac OSX卡塔利娜,"/bin/bash"并~/.zprofile为我工作:
Apple 已将默认 shell 更改为zsh.因此您必须重命名配置文件。.bashrc现在是.zshrc和.bash_profile现在.zprofile。
在您的主目录中,添加这些行.profile(如果文件不存在,则创建该文件),以便获取.bashrc:
if [ "$SHELL" = "/bin/bash" ]; then
. ~/.bashrc
fi
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7076 次 |
| 最近记录: |