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

Define behavior of globstar (**) #342

Open
joachimmetz opened this issue Jun 9, 2019 · 2 comments
Open

Define behavior of globstar (**) #342

joachimmetz opened this issue Jun 9, 2019 · 2 comments
Assignees

Comments

@joachimmetz
Copy link
Member

joachimmetz commented Jun 9, 2019

Define behavior of globstar (**)

Bash supports:

  • stand-alone **, behaves like */**
  • a prefix d**, behaves like d*/**
  • a suffix **c, behaves like *c/**
  • a prefix and suffix d**c, behaves like d*c/**

From bash manual

*      Matches any string, including the null string.  When the globstar shell option is enabled, and * is used in a pathname expansion context, two adjacent *s used as a single pattern will match all files and zero or
       more directories and subdirectories.  If followed by a /, two adjacent *s will match only directories and subdirectories.
@joachimmetz
Copy link
Member Author

joachimmetz commented Jun 9, 2019

@joachimmetz joachimmetz self-assigned this Jun 9, 2019
@joachimmetz
Copy link
Member Author

joachimmetz commented Jun 10, 2019

For now only support paths with a single globstar formatted as: **, **2 upto **10

**1 makes no sense to support

Changes to have validator enforce this #344

Todo: consider to support path with multiple globstars
Todo: define default recursion depth, or discourage usage of globstar without recursion depth

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

No branches or pull requests

1 participant