Globs
Many Tenx comamnds and configuration options take glob patterns as arguments. The syntax for these patterns are as follows1:
?matches any single character.*matches zero or more characters.**recursively matches directories but are only legal in three situations. First, if the glob starts with**/, then it matches all directories. For example,**/foomatchesfooandbar/foobut notfoo/bar. Secondly, if the glob ends with/**, then it matches all sub-entries. For example,foo/**matchesfoo/aandfoo/a/b, but notfoo. Thirdly, if the glob contains/**/anywhere within the pattern, then it matches zero or more directories. Using**anywhere else is illegal (N.B. the glob**is allowed and means "match everything").{a,b}matchesaorbwhereaandbare arbitrary glob patterns. (N.B. Nesting{...}is not allowed.)[ab]matchesaorbwhereaandbare characters. Use[!ab]to match any character except foraandb.- Metacharacters such as
*and?can be escaped with character class notation. e.g.,[*]matches*.
In some places, negative globs are allowed. These are globs that start with
!, and they exclude files that match the pattern. For example, !**/*.rs
would exclude all Rust files from a set of files.
1
From docs for the globset crate.