Xiaoru Li: I use zsh in my terminal and have configured my command prompt with all my zsh themes and plugins to be colorful and full of useful information. This is a nice setup for data use but can be very destructing for the audience if I use this to teach and to record screencasts.
To clear up all the symbols and information only in VS Code, but not globally system-wide, we can go to settings, and add a custom environment's variable. I am using MacOS, so I am going to add a new property, terminal.integrated.env.osx, and a new variable which will run a value.
This way, when a new terminal respond inside VS Code, zsh can pick up this custom environment variable and realize that it's in VS Code, but not in external standalone terminals like iTerm2.
Now, let's open our zsh resource file, zshrc and add a simple check at the end of the file to handle the case when the terminal is open in VS Code.
Let's set the PS1, the prompt itself to a single $ sign and a space. Now we can save and reload everything, then test it out.
As you can see, the command prompt is now a $ sign in the VS Code terminal, but I still have the fancy setup in iTerm2.