Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Unix: Emulation of ~ (tilde) expansion for native utilities is syntactically incomplete #20754

Copy link
Copy link
@mklement0

Description

@mklement0
Issue body actions

Prerequisites

Steps to reproduce

Related:


/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/jdoe

That 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 of echo \~ 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

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    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

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.