Skip to content

Add an option to disable globbing on Linux #17176

@Shayan-To

Description

@Shayan-To

Summary of the new feature / enhancement

PowerShell now expands the globs when using native commands on Linux. This is very inconvenient to me for a few reasons:

  • I use PowerShell on both Linux and Windows, and I have to always be cautious so that I don't make mistakes. (I can use git checkout master -- * on Windows, but I have to quote the * on Linux. It was really scary when I once ran yarn up ** on Linux...)
  • When working with bash, I know that it will always expand the globs I use. When working with PowerShell on Windows, I know that it will never do that. But on Linux, it has an inconsistent behavior that I have to think about before running commands. (This gets worse when the same command can mean different things on Windows and Linux, like rm and ls and the likes.)
  • PowerShell glob expansion still needs work (Native globbing doesn't respect bypassing via the escape character (backtick) in unquoted arguments #15959 and Need syntax or cmdlet for globbing with space (i.e. glue quoted literals with globs) #13098 for example), and I don't want to get caught in the middle of my work.
  • I don't like glob expansion in bash anyways. It is a somewhat scary feature to me. (I almost always quote my wildcards in bash, if the command I'm using recognizes them (like git), or switch to PowerShell if it doesn't.)

Proposed technical implementation details (optional)

Add a configuration to PowerShell to disable glob expansion on Linux, or if such configuration already exists, include a mention to it in the docs (here for example).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugNeeds-TriageThe issue is new and needs to be triaged by a work group.Resolution-No ActivityIssue has had no activity for 6 months or moreWG-Engine-Providersbuilt-in PowerShell providers such as FileSystem, Certificates, Registry, etc.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions