Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Rogue" filenames that contain a backslash break automatic globbing for native commands on macOS and Linux #10682

Closed
mklement0 opened this issue Oct 2, 2019 · 3 comments

Comments

@mklement0
Copy link
Contributor

commented Oct 2, 2019

Note: This case is covered by catch-all issue #9244

The presence of a filename containing a \ that matches a wildcard pattern causes native globbing to fail quietly (and pass the pattern through as-is, as if nothing matched).

Note that \ is a legal filename character on Unix-like platforms.

Steps to reproduce

On macOS and Linux:

touch 'a\b'
/bin/echo * | Should -Not -Be '*'
rm 'a\b'

Expected behavior

The test should pass.

Actual behavior

The test fails, because * is echoed as-is - no expansion to matching filenames occurs.

Windows is not affected, because native globbing isn't applied there).

Environment data

PowerShell Core v7.0.0-preview.4 on macOS 10.14.6
PowerShell Core v7.0.0-preview.4 (7.0.0-preview.4) on Ubuntu 18.04.3 LTS
@iSazonov

This comment has been minimized.

Copy link
Collaborator

commented Oct 7, 2019

Note: This is a regression.

Which version?

Does it work on Linux?

@iSazonov iSazonov added the Area-Engine label Oct 7, 2019
@mklement0 mklement0 changed the title Automatic globbing for native commands is broken on macOS "Rogue" filenames break automatic globbing for native commands on macOS and Linux Oct 7, 2019
@mklement0 mklement0 changed the title "Rogue" filenames break automatic globbing for native commands on macOS and Linux "Rouge" filenames that contain a backslash break automatic globbing for native commands on macOS and Linux Oct 7, 2019
@mklement0

This comment has been minimized.

Copy link
Contributor Author

commented Oct 7, 2019

The version is stated in the OP, and I originally thought it affects macOS only - but (a) that isn't true and (b) the problem is much more specific - please see the updated title and OP.

@mklement0

This comment has been minimized.

Copy link
Contributor Author

commented Oct 7, 2019

Never mind: I just realized that all backslash-escaped woes are covered in #9244, though I'll add a note there about this specific scenario.

@mklement0 mklement0 closed this Oct 7, 2019
@mklement0 mklement0 changed the title "Rouge" filenames that contain a backslash break automatic globbing for native commands on macOS and Linux "Rogue" filenames that contain a backslash break automatic globbing for native commands on macOS and Linux Oct 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.