OSC 9;9 path seems to be invalid #12248

Closed
opened 2026-01-31 03:10:15 +00:00 by claunia · 4 comments
Owner

Originally created by @jack775544 on GitHub (Jan 28, 2021).

Environment

Windows build number: Microsoft Windows [Version 10.0.19042.746]
Windows Terminal version (if applicable): 1.6.10272.0

Any other software?
Powershell Core & Powershell 5

Steps to reproduce

I was trying out the new out the new OSC 9;9 reporting in the 1.6 release of the terminal and it seems that when I try to duplicate a pane after setting the path using OSC 9;9 the terminal can never find the location of the path set and shows the error 0x8007010b error.

In my case I have altered my terminal launch profile for powershell to include the -noprofile parameter for easier testing.

Expected behavior

  • Launch Powershell in terminal
  • Run the following
cd 'C:\Program Files\'
"$([char]27)]9;9;`"$($pwd.Path)`"$([char]7)"
  • Run duplicate pane command
  • New pane should open in C:\Program Files

Actual behavior

image

It is important to note that performing the exact same set of commands in ConEmu will correctly open the new pane in Program Files as expected.

Other Notes

Powershell Launch Profile:

{
	"guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}",
	"hidden": false,
	"name": "PowerShell Core",
	"source": "Windows.Terminal.PowershellCore",
	"commandline" : "C:\\Program Files\\PowerShell\\7\\pwsh.exe -noprofile",
}

Duplicate pane key bind:

{ "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" }
Originally created by @jack775544 on GitHub (Jan 28, 2021). # Environment ```none Windows build number: Microsoft Windows [Version 10.0.19042.746] Windows Terminal version (if applicable): 1.6.10272.0 Any other software? Powershell Core & Powershell 5 ``` # Steps to reproduce I was trying out the new out the new OSC 9;9 reporting in the 1.6 release of the terminal and it seems that when I try to duplicate a pane after setting the path using OSC 9;9 the terminal can never find the location of the path set and shows the `error 0x8007010b` error. In my case I have altered my terminal launch profile for powershell to include the `-noprofile` parameter for easier testing. # Expected behavior * Launch Powershell in terminal * Run the following ```ps1 cd 'C:\Program Files\' "$([char]27)]9;9;`"$($pwd.Path)`"$([char]7)" ``` * Run duplicate pane command * New pane should open in `C:\Program Files` # Actual behavior ![image](https://user-images.githubusercontent.com/8287765/106204325-88d73e00-6208-11eb-9867-376d26439159.png) It is important to note that performing the exact same set of commands in ConEmu will correctly open the new pane in Program Files as expected. # Other Notes Powershell Launch Profile: ```json { "guid": "{574e775e-4f2a-5b96-ac1e-a2962a402336}", "hidden": false, "name": "PowerShell Core", "source": "Windows.Terminal.PowershellCore", "commandline" : "C:\\Program Files\\PowerShell\\7\\pwsh.exe -noprofile", } ``` Duplicate pane key bind: ```json { "command": { "action": "splitPane", "split": "auto", "splitMode": "duplicate" }, "keys": "alt+shift+d" } ```
Author
Owner

@zadjii-msft commented on GitHub (Jan 28, 2021):

ho boy that sure looks wrong
image

Hmm.
image

I wonder if the double-quotes wrapping the string are confusing it.

/cc @skyline75489

@zadjii-msft commented on GitHub (Jan 28, 2021): ho boy that sure looks wrong ![image](https://user-images.githubusercontent.com/18356694/106205221-c80f7b80-6183-11eb-8994-4c5694261fb8.png) Hmm. ![image](https://user-images.githubusercontent.com/18356694/106205608-5edc3800-6184-11eb-8d23-d49429ce7131.png) I wonder if the double-quotes wrapping the string are confusing it. /cc @skyline75489
Author
Owner

@jack775544 commented on GitHub (Jan 28, 2021):

Removing the double quotes does seem to fix the issue however the implementation that I saw in oh-my-posh as well as the ConEmu docs both seemed to imply that the double quotes are intended.

@jack775544 commented on GitHub (Jan 28, 2021): Removing the double quotes does seem to fix the issue however the implementation that I saw in [oh-my-posh](https://github.com/JanDeDobbeleer/oh-my-posh/blob/master/oh-my-posh.psm1#L38) as well as the [ConEmu docs](https://conemu.github.io/en/AnsiEscapeCodes.html#ConEmu_specific_OSC) both seemed to imply that the double quotes are intended.
Author
Owner

@skyline75489 commented on GitHub (Jan 28, 2021):

Thanks for trying out the feature! I didn’t know there’s OSC;9;9 implementation in oh-my-posh until now. I was baking my own implementation so obviously it is not tested that much. Will take a look today.

@skyline75489 commented on GitHub (Jan 28, 2021): Thanks for trying out the feature! I didn’t know there’s OSC;9;9 implementation in oh-my-posh until now. I was baking my own implementation so obviously it is not tested that much. Will take a look today.
Author
Owner

@ghost commented on GitHub (Feb 11, 2021):

:tada:This issue was addressed in #8934, which has now been successfully released as Windows Terminal Preview v1.6.10412.0.🎉

Handy links:

@ghost commented on GitHub (Feb 11, 2021): :tada:This issue was addressed in #8934, which has now been successfully released as `Windows Terminal Preview v1.6.10412.0`.:tada: Handy links: * [Release Notes](https://github.com/microsoft/terminal/releases/tag/v1.6.10412.0) * [Store Download](https://www.microsoft.com/store/apps/9n8g5rfz9xk3?cid=storebadge&ocid=badge)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12248