-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Open
Labels
Needs-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
Note:
-
Currently, the problem only affects Unix-like platforms, because only there is the emulation of tilde expansion for native programs implemented.
-
However, once Add tilde expansion for windows native executables #20402 is merged, it'll affect Windows too.
The solution is the same on both platforms: preserve the unquoted status of an initial ~ if specified as such.
$null = New-Item -Force "$HOME/a test"
(TabExpansion2 'code ~/a').CompletionMatches[0].CompletionText
(TabExpansion2 'code ~/''a').CompletionMatches[0].CompletionText
(TabExpansion2 'code ~/"a').CompletionMatches[0].CompletionText
# Remove-Item "$HOME/a test" # clean upRelated:
Expected behavior
~/'a test'
~/'a test'
~/"a test"That is, the unquoted status of the initial ~ should be preserved.
Actual behavior
'~/a test'
'~/a test'
'~/a test'That is, all expansions resulted in inappropriate quoting in that the previously unquoted ~ - required to trigger PowerShell's tilde-expansion emulation when calling external programs - is now quoted.
Error details
No response
Environment data
PowerShell 7.4.0 on Unix-like platforms.Visuals
No response
domsleee and ikkierie
Metadata
Metadata
Assignees
Labels
Needs-TriageThe issue is new and needs to be triaged by a work group.The issue is new and needs to be triaged by a work group.