Skip to content

Reject if a redirection operand expands to more than one field in an interactive shell #95

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

Closed
Tracked by #84
magicant opened this issue Dec 22, 2024 · 0 comments · Fixed by #158
Closed
Tracked by #84
Assignees
Milestone

Comments

@magicant
Copy link
Owner

magicant commented Dec 22, 2024

Assume we have two files named foo and bar in the current working directory. Type : <* in an interactive shell.

Current behavior:

  • If the posixly_correct option is on, the shell tries to open a file named *
  • Otherwise, the redirection fails with the error message filename `*' matches more than one file

Expected behavior:

  • The redirection fails with the error message filename `*' matches more than one file regardless of the posixly_correct option

Reference:

Rationale:

  • The new behavior is not strictly required by POSIX.1-2024, but it would be desirable to always report the error rather than to proceed as if the expansion did not occur.
@magicant magicant changed the title Reject if a redirection operand expands to more than one field in an interactive shell * Reject if a redirection operand expands to more than one field in an interactive shell Dec 22, 2024
@magicant magicant added the good first issue Good for newcomers label Dec 22, 2024
@magicant magicant removed the good first issue Good for newcomers label Apr 18, 2025
@magicant magicant self-assigned this Apr 18, 2025
@magicant magicant added this to the 2.59 milestone Apr 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant