Change:
Type: <bBug</bIt seems that launching a custom integrated terminal profile may wrap the with an extra set of quotation marks. I did not notice the behavior with the baseline terminals. to integrate terminal profile settings as such (using , unsure if other nonstandard terminals are impacted) integrated terminal that the current directory shows an extra ! to split the terminal and receive an error ! Turning on Trace logging, the following shows up in the logs Note the parameter which is wrapped in I had also tried while running and had the same behavior VS Code version: Code 1.71.0 (, 2022-09-01T07:36:10.600Z) OS version: WindowsNT x64 10.0. Modes: Sandboxed: No <details<summarySystem Info</summary </details<details<summaryExtensions (19)</summaryExtensionVersion ------ vscode-eslint2.2.6 xml2.5.1 gitlens12.2.1 vsc-material-theme33.2.0 vsc-material-theme-icons1.2.2 prettier-vscode9.8.0 auto-rename-tag0.1.10 vscode-pull-request-github0.50.0 rainbow-csv2.4.0 remote-containers0.251.0 remote-wsl0.66.3 vscode-remote-extensionpack0.21.0 powershell2022.8.5 vsliveshare1.0.5705 material-icon-theme4.20.0 vscode-thunder-client1.18.7 code-spell-checker2.7.2 vscode-icons11.16.0 markdown-all-in-one3.4.3 </details<details<summaryA/B Experiments</summary</details<!-- generated by issue reporter --
Also mentioned at and
Same on my system: The CWD has extra quotation marks, when I use "Split Terminal". ! Tested also with
adding you bc you made changes in this area recently
it's been a minute... can you refresh my memory of where you saw this?
no prob I will investigate it as I was heavily involved in the profiles work
I can't seem to reproduce here, but we can do a sanity check in terminalProcess and strip quotes off the cwd
your PR let me dive into the dev tools to see if I could trace where the value was coming from. It seems to be set initially correctly, but then something from calls an that then calls with the value (triggered by this registered handler ), which then calls with So, not sure if maybe it's actually an XTerm issue? Or, maybe it's from my Powershell configuration (using OhMyPosh with some Powerline stuff). Looks like a is dealing with that looks like Yep, looks like it's related to having some Powerline segments in my prompt profile. Just want to note that it hadn't been an issue in the previous VS Code version, but it's something that I can work around for now if it persists
For me, the default seems to work without issue. But PowerLine's prompt is fairly customizable. please let us know if you hit this on the latest Insiders
great investigation! Some shells send the sequence you see there so this is that shell integration conflicting with our own. It looks like we need to sanitize this a little better: Maybe just centralizing it here: , that way it won't ever get into the "shell launch config" to begin with. Let's track that in as the immediate problem is resolved by the commit in this issue. would have also prevented this but we should sanitize the cwd better as above regardless.
Glad to help! If it aids at all with debugging, this was the basis for my theme: and initialized with I just downloaded the insiders installer (v1.72.0-insider, commit: ) and still see the same behavior around terminal launching/splitting (PowerShell v7.2.6)

Discussion:
} function _sanitizeCwd(cwd: string): string { <ins> // Sanity check that the cwd is not wrapped in quotes (see #160109) if (cwd.match(/$['"].*['"]^/)) { cwd = cwd.substring(1, cwd.length - 1); } </ins> // Make the drive letter uppercase on Windows (see #9448) if (OS === OperatingSystem.Windows && cwd && cwd[1] === ':') { return cwd[0].toUpperCase() + cwd.substr(1);