treyhunner/editorconfig — Issue #2: Decide how glob escaping should work
Author: treyhunner
Created: 2011-10-20 16:22:32+00:00
State: open

The below issues need to be resolved before a generic method for parsing can be defined.

1. Should `[` and `]` characters be escaped in file globs? Section headers are surrounded by these characters so it might be confusing, but this shouldn't lead to parsing ambiguity because a command (";") or a newline denote the end of the section header as well (both optionally preceded by whitespace).

2. How will asterisk's be escaped in filenames? Git follows the format of [fnmatch](http://manpages.ubuntu.com/manpages/natty/man3/fnmatch.3.html) which is based on [glob](http://manpages.ubuntu.com/manpages/natty/man7/glob.7.html) and allows `[*]` to denote an escaped asterisk. Vim's [globpath](http://vimdoc.sourceforge.net/htmldoc/eval.html#globpath(\)) supports this notation as well.

3. What types of wildcards should be supported? Should `?` be supported as a single character wildcard? Should `[`...`]` expressions be used to match a single character any of the characters between the square brackets. C`s fnmatch and Vim's globpath both allow these constructs.

Allowing more flexibility in pattern matching means more power for users typing in file globs but it also may make plugin creation more difficult if a glob matching function is not already available in the language/framework used to write the plugin.