1

I'd like to see if .bashrc is running inside the VSCode terminal.

I'm adding some aliases and doing some customization in my .bashhrc that I want to be applied also inside the VSCode terminal, but I don't want the last line in my script, "cd /var/myrepo," to happen because I want the terminal to stay in the current directory when opened inside VSCode.

which condition can I specify inside .bashrc to ignore some commands while running inside VSCode terminal?

Antonio Petricca
  • 6,313
  • 5
  • 28
  • 63
Omtechguy
  • 2,949
  • 4
  • 35
  • 66

1 Answers1

1

Check if the variable TERM_PROGRAM equals to vscode.

Antonio Petricca
  • 6,313
  • 5
  • 28
  • 63