I found the same problem which is with a path containg brackets.
$PSVersionTable
version:
Name Value
---- -----
PSVersion 5.1.19041.5486
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.19041.5486
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
I open two folders with VSCode.
One folder hello
to the right with a powershell of terminal panel by default showing current working directory where hello
is.
The other folder to the left with a powershell terminal panel by default showing a folder under
C:\WINDOWS\System32\WindowsPowerShell
instead of the folder I open.
I tried to use cd command to change the cwd shown in the powershell terminal of panel and restarted my VSCode.
But it does not work.
Here is the settings.json which only contains
{
"workbench.iconTheme": "vscode-icons",
"workbench.colorTheme": "Solarized Light",
"python.terminal.executeInFileDir": true
}
but the powershell of terminal panel to the left VSCode still shows a folder under
C:\WINDOWS\System32\WindowsPowerShell.
I also tried to check
prython > terminal: execute in file dir
in the setting of VSCode.
It does not work.
How do I set each folder I open in VSCode and then poweshell of terminal panel shows corresponding folder I actually open instead of the same folder under
C:\WINDOWS\System32\WindowsPowerShell?
It seem only the folder to the left occurs this situation.