Five Years Later, same-issue-ai Still Fooled Everyone — This Is Not a Duplicate, the Problem Remains: The Square Brackets Nightmare in Paths #23842

Open
opened 2026-01-31 08:54:07 +00:00 by claunia · 0 comments
Owner

Originally created by @cnrat on GitHub (Nov 27, 2025).

Windows Terminal version

1.23.12811.0

Windows build number

10.0.22631.6199

Other Software

No response

Steps to reproduce

  1. Create a directory that contains square brackets ([ or ]) in its name.
  2. Open cmd.exe and use cd /d to navigate into this directory.
  3. If you try to launch wt.exe from this path, the current directory in Windows Terminal defaults to your user home directory instead of the target path.
  4. If you try to launch powershell.exe from this path, the current directory is set to C:\Windows\System32\WindowsPowerShell\v1.0
  5. wt -d has the same issue
  6. The latest Powershell do solve this issue a bit, Set-Location works but cd /d still broken, -literalPath is not supported by wt.exe

Expected Behavior

The user should be able to launch wt.exe or powershell.exe normally from a path that contains square brackets ([ or ]) without the current directory being reset.

Actual Behavior

Both wt.exe and powershell.exe still fail to handle paths containing square brackets correctly.
PowerShell partially mitigates the issue by fixing Set-Location and using the -LiteralPath parameter, but the problem persists.


This is a violation of design principles. When introducing exciting new features in PowerShell, we must ensure backward compatibility.
Applying one workaround after another to mask a fundamental design flaw, as is happening now, is not acceptable.

Originally created by @cnrat on GitHub (Nov 27, 2025). ### Windows Terminal version 1.23.12811.0 ### Windows build number 10.0.22631.6199 ### Other Software _No response_ ### Steps to reproduce 1. Create a directory that contains square brackets (`[` or `]`) in its name. 2. Open `cmd.exe` and use `cd /d` to navigate into this directory. 3. If you try to launch `wt.exe` from this path, the current directory in Windows Terminal defaults to your user home directory instead of the target path. 4. If you try to launch `powershell.exe` from this path, the current directory is set to `C:\Windows\System32\WindowsPowerShell\v1.0` 5. `wt -d` has the same issue 6. The latest Powershell do solve this issue a bit, `Set-Location` works but `cd /d` still broken, `-literalPath` is not supported by `wt.exe` ### Expected Behavior The user should be able to launch `wt.exe` or `powershell.exe` normally from a path that contains square brackets (`[` or `]`) without the current directory being reset. ### Actual Behavior Both `wt.exe` and `powershell.exe` still fail to handle paths containing square brackets correctly. `PowerShell` partially mitigates the issue by fixing `Set-Location` and using the `-LiteralPath` parameter, but the problem persists. --- This is a violation of design principles. When introducing exciting new features in PowerShell, we must ensure backward compatibility. Applying one workaround after another to mask a fundamental design flaw, as is happening now, is not acceptable.
claunia added the Needs-TriageIssue-BugResolution-ExternalNeeds-Attention labels 2026-01-31 08:54:07 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23842