VSCode Integrated Terminal Doesn't Load .bashrc or .bash_profile

后端 未结 4 1419
抹茶落季
抹茶落季 2020-12-17 10:16

I have the following files to handle shell configuration:

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

and

<         


        
4条回答
  •  抹茶落季
    2020-12-17 10:45

    Simply add shell args to the settings. Tested on Windows with git bash but it should work same on Osx and Linux.

    In C:\Users\\AppData\Roaming\Code\User\settings.json or where your windows setting is: Add one of the following:

    "terminal.integrated.shellArgs.windows": ["-l"],
    
    "terminal.integrated.shellArgs.linux": ["-l"],
    
    "terminal.integrated.shellArgs.osx": ["-l"],
    

    just below "terminal.integrated.shell....

    This will launch bash with the login argument.

提交回复
热议问题