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

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

Open
Tracked by #84
magicant opened this issue Dec 22, 2024 · 0 comments
Labels
good first issue Good for newcomers

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant