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

后端 未结 4 1440
抹茶落季
抹茶落季 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

    You could also try the following:

    1 Create a file named /usr/local/bin/bash-login and add :

    #!/bin/bash
    bash -l
    

    2 Run:

    chmod +x /usr/local/bin/bash-login 
    

    to make it executable.

    3 On your VSC user settings add

       { "terminal.integrated.shell.osx": "/usr/local/bin/bash-login" }
    

    The solution was described at https://github.com/Microsoft/vscode/issues/7263.

    Hope it helps

提交回复
热议问题