I'm not trying to precisely match the behaviour of an existing glob syntax unless that behaviour really seems like the most obvious/easiest-to-use syntax. However, I do want globs to feel familiar to use.
I'll say that '**' matches anything, and '*' matches anything except directory separators. Without thinking too hard, how do you expect the following globs to behave?
*.c
**.c
**/*.c
src/*/*.c
src/**
More specifically:
- Should
'*.c'
match '.c'? - Should
'**.c'
match '.c'? - Should
'**/*.c'
match 'foo.c'? Should it match 'foo/.c'? - Should
'src/*/*.c'
match 'src/foo.c'?