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
  • 8,891
  • 5
  • 36
  • 74
Omtechguy
  • 3,321
  • 7
  • 37
  • 71

1 Answers1

1

Check if the variable TERM_PROGRAM equals to vscode.

Antonio Petricca
  • 8,891
  • 5
  • 36
  • 74