Open from windows explorer fails on paths containing certain symbols on older PowerShell versions #17816

Open
opened 2026-01-31 05:55:16 +00:00 by claunia · 0 comments
Owner

Originally created by @CptWesley on GitHub (Jun 28, 2022).

Windows Terminal version

1.14.1451.0

Windows build number

10.0.19043.1766

Other Software

PowerShell 5.1.19041.1682 (might be the actual culprit)

Steps to reproduce

Set default terminal to PowerShell 5

Create directory on desktop named test
Open directory test in explorer
Right click and select Open in Terminal (A)

Create directory on desktop named test]
Open directory test] in explorer
Right click and select Open in Terminal (B)

Create directory on desktop named [test
Open directory [test in explorer
Right click and select Open in Terminal (C)

Create directory on desktop named [test]
Open directory [test] in explorer
Right click and select Open in Terminal (D)

Expected Behavior

(A): Powershell 5 tab in Windows Terminal opens in %UserProfile%\Desktop\test
(B): Powershell 5 tab in Windows Terminal opens in %UserProfile%\Desktop\test]
(C): Powershell 5 tab in Windows Terminal opens in %UserProfile%\Desktop\[test
(D): Powershell 5 tab in Windows Terminal opens in %UserProfile%\Desktop\[test]

NB: This is the actual behaviour when selecting Open PowerShell window here (thus not using Windows Terminal) and also the behaviour when using newer PowerShell versions in Windows Terminal.

Actual Behavior

(A): Powershell 5 tab in Windows Terminal opens in %UserProfile%\Desktop\test
(B): Powershell 5 tab in Windows Terminal opens in %UserProfile%\Desktop\test]
(C): Powershell 5 tab in Windows Terminal opens in C:\
(D): Powershell 5 tab in Windows Terminal opens in C:\WINDOWS\System32\WindowsPowerShell\v1.0

Originally created by @CptWesley on GitHub (Jun 28, 2022). ### Windows Terminal version 1.14.1451.0 ### Windows build number 10.0.19043.1766 ### Other Software PowerShell 5.1.19041.1682 (might be the actual culprit) ### Steps to reproduce Set default terminal to PowerShell 5 Create directory on desktop named `test` Open directory `test` in explorer Right click and select `Open in Terminal` (A) Create directory on desktop named `test]` Open directory `test]` in explorer Right click and select `Open in Terminal` (B) Create directory on desktop named `[test` Open directory `[test` in explorer Right click and select `Open in Terminal` (C) Create directory on desktop named `[test]` Open directory `[test]` in explorer Right click and select `Open in Terminal` (D) ### Expected Behavior (A): Powershell 5 tab in Windows Terminal opens in `%UserProfile%\Desktop\test` (B): Powershell 5 tab in Windows Terminal opens in `%UserProfile%\Desktop\test]` (C): Powershell 5 tab in Windows Terminal opens in `%UserProfile%\Desktop\[test` (D): Powershell 5 tab in Windows Terminal opens in `%UserProfile%\Desktop\[test]` **NB:** This is the actual behaviour when selecting `Open PowerShell window here` (thus not using Windows Terminal) and also the behaviour when using newer PowerShell versions in Windows Terminal. ### Actual Behavior (A): Powershell 5 tab in Windows Terminal opens in `%UserProfile%\Desktop\test` (B): Powershell 5 tab in Windows Terminal opens in `%UserProfile%\Desktop\test]` (C): Powershell 5 tab in Windows Terminal opens in `C:\` (D): Powershell 5 tab in Windows Terminal opens in `C:\WINDOWS\System32\WindowsPowerShell\v1.0`
claunia added the Resolution-By-DesignNeeds-TriageIssue-BugNeeds-Tag-Fix labels 2026-01-31 05:55:16 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#17816