-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Open
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productNeeds-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.OS-LinuxOS-macOS
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
Related:
- Emulation of ~ (tilde) expansion for native utilities is incomplete #11386, the fix for which only partially addressed the issue.
- Implement ~username expansion on Windows and Linux #12387
/bin/echo ~/'foo'
/bin/echo ~/'foo bar'
/bin/echo ~/foo` bar
/bin/echo `~
/bin/echo ~'/'Expected behavior
/Users/jdoe/foo
/Users/jdoe/foo bar
/Users/jdoe/foo bar
~
~/Actual behavior
/Users/jdoe/foo
~/foo bar
~/foo bar
/Users/jdoe
/Users/jdoeThat is:
-
the form with a substring that contains spaces - either quoted or with an
`-escaped space - unexpectedly didn't expand (expansion should occur as long as the~/prefix isn't quoted or escaped). -
the escaped
~unexpected expanded nonetheless (equivalent ofecho \~in Bash). -
even though the
/after~was quoted, (~'/'), expansion still unexpectedly occurred.
Error details
No response
Environment data
PowerShell 7.4.1 on Unix-like platforms.Visuals
No response
cmplstofB
Metadata
Metadata
Assignees
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productNeeds-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.OS-LinuxOS-macOS