Skip to content

WINUX_SHELL_GLOB=native: self-expansion is inconsistent — cat expands '*' but uniq, hexdump, dd and tree receive the literal '*' and fail #1374

Closed

Description

@caomengxuan666

Probe-verified (same-source mingw+Wine harness, two runs). With WINUX_SHELL_GLOB=native the shell leaves glob expansion to each command, and the command set is internally inconsistent about whether it happens at all.

Fixture: directory containing a.txt (AAA) and b.txt (BBB). All commands receive the literal operand *:

  • cat * → prints AAA and BBB (cat self-expands), exit 0.
  • uniq * → uniq: *: No such file or directory, exit 1.
  • hexdump * → hexdump: '*': No such file or directory, exit 1.
  • dd if=* ... → dd: failed to open '*': No such file or directory, exit 1.
  • tree * → tree: cannot access '*': No such file or directory, exit 1.

Expected

One documented rule for the whole set: in native-glob mode either every file-taking applet expands patterns through the shared glob_expand path (as cat does), or none does and the mode means something else — but identical user input must not succeed for one tool and fail with a literal-name error for its siblings. (65 applets call glob_expand in the audited tree; uniq/hexdump/xxd/dd/tree/patch are among those that do not.)

Source

Per-command: expansion is opt-in at each call site instead of being a dispatcher-level guarantee; the non-expanding applets listed above never call the shared helper.

Regression seed

In-repo test named with this issue number: the five probes above under WINUX_SHELL_GLOB=native, asserting consistent treatment of *.

Activity

  1. added
    bug
    compat-gap
    on Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugcompat-gap

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions