mirror of
https://github.com/sharkdp/bat.git
synced 2025-02-20 20:08:58 +00:00
Document another rule ignore condition
This commit is contained in:
parent
12fa2cb1eb
commit
36073a3d95
@ -61,9 +61,8 @@ impl<'a> SyntaxMapping<'a> {
|
||||
///
|
||||
/// Builtin mappings' `GlobMatcher`s are lazily compiled.
|
||||
///
|
||||
/// Note that this function ignores builtin mappings that are invalid under
|
||||
/// the current environment (i.e. their rules require an environment
|
||||
/// variable that is unset).
|
||||
/// Note that this function only returns mappings that are valid under the
|
||||
/// current environment. For details see [`Self::builtin_mappings`].
|
||||
pub fn all_mappings(&self) -> impl Iterator<Item = (&GlobMatcher, &MappingTarget<'a>)> {
|
||||
self.custom_mappings()
|
||||
.iter()
|
||||
@ -83,8 +82,10 @@ impl<'a> SyntaxMapping<'a> {
|
||||
///
|
||||
/// The `GlabMatcher`s are lazily compiled.
|
||||
///
|
||||
/// If a mapping rule requires an environment variable that is unset, it
|
||||
/// will be ignored.
|
||||
/// Mappings that are invalid under the current environment (i.e. rule
|
||||
/// requires environment variable(s) that is unset, or the joined string
|
||||
/// after variable(s) replacement is not a valid glob expression) are
|
||||
/// ignored.
|
||||
pub fn builtin_mappings(
|
||||
&self,
|
||||
) -> impl Iterator<Item = (&'static GlobMatcher, &'static MappingTarget<'static>)> {
|
||||
|
@ -76,7 +76,8 @@ could write something like this:
|
||||
```
|
||||
|
||||
If any environment variable replacement in a rule fails (for example when a
|
||||
variable is unset), the entire rule will be ignored.
|
||||
variable is unset), or if the glob string after replacements is invalid, the
|
||||
entire rule will be ignored.
|
||||
|
||||
### Explicitly mapping to unknown
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user