Skip to content

Unix-like platforms: native globbing and tilde expansion cannot be prevented with backtick-escaping #21304

@mklement0

Description

@mklement0

Prerequisites

Steps to reproduce

Note:

  • With respect to tilde expansion, Windows is affected too, in the context of the experimental PSNativeWindowsTildeExpansion feature.

Normally, interpreting what would otherwise be an argument parsing-mode metacharacter literally can be deactivated with `; e.g, cmd /c echo `@ and cmd /c echo '@' are equivalent.

The same should apply to the POSIX-shell emulation features:

# Run on Linux or macOS.

# Tilde expansion: `~ should ensure *literal* treatment of ~
/bin/echo `~

# Native globbing: `* should ensure *literal* treatment of *
/bin/echo `*

See also:

Expected behavior

~ and * should print literally.

Actual behavior

The `-escaping is ignored, and expansion is still performed.

Error details

No response

Environment data

PowerShell 7.5.0-preview.2

Visuals

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs-TriageThe issue is new and needs to be triaged by a work group.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions