Skip to content

[exec][P1] pipeline members skip shell functions: 'date(){ echo FAKE; }; date | cat' runs the external date #587

Closed

Description

@caomengxuan666

GNU bash 5.3: function wins in a pipeline. niu: the PATH external runs (real date printed). Non-pipeline invocation of the same function is fine — only pipeline membership bypasses function lookup.

niu -c 'date(){ echo FAKE; }; date | cat'   # prints the real date, GNU prints FAKE

Silent, rc 0, hits every wrapper-function idiom (t(){...}; t git log | wc -l silently ran a 0-byte PATH stub). Found in the 1.4.0 real-world sweep.

Activity

  1. added
    bug
    on Oct 13, 2026
  2. added a commit that references this issue on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions