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

Tracking issue of BCP-96: Add Glob Patterns Support #98

Open
2 tasks
JinnyYi opened this issue Nov 8, 2021 · 1 comment
Open
2 tasks

Tracking issue of BCP-96: Add Glob Patterns Support #98

JinnyYi opened this issue Nov 8, 2021 · 1 comment
Assignees
Milestone

Comments

@JinnyYi
Copy link
Contributor

JinnyYi commented Nov 8, 2021

RFC PR: #96

Steps

  • Implement glob patterns
  • Update docs for glob support
@JinnyYi
Copy link
Contributor Author

JinnyYi commented Nov 11, 2021

In the current BCP and implementation for glob, we tried to expand the pattern while executing the command. This brings up the following questions:

  • Inconsistent with the shell's behavior of interpreting first, then executing.
    • shell attempts to expand the argument by matching the wildcard to all possible files in the path. The resulting set of file paths is then sent to the target command as a list of arguments.
  • Wildcard expanding and command execution mashups make implementation complex.
    • There is no suitable Glob adapted to our scenario.
    • Some Match implementations that require pattern to match all of name, not just a substring. So we have to expand and match pattern level by level.

We plan to restate the GSP with the expected behavior of expanding the glob first and then executing the command (with the result paths as a list of arguments of the command). For this case, we need to:

  • Support command line args
  • Implement glob pattern expand
    • In the progress of expanding, we will recursively list the directories and then match the path names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Backlog
Development

No branches or pull requests

2 participants