@@ -288,8 +288,8 @@ impl App {
289 fn style_components(&self) -> Result<StyleComponents> {
289 fn style_components(&self) -> Result<StyleComponents> {
290 let matches = &self.matches;
290 let matches = &self.matches;
291− Ok(StyleComponents(
291+ let mut styled_components =
292− if matches.value_of("decorations") == Some("never") {
292+ StyleComponents(if matches.value_of("decorations") == Some("never") {
293 HashSet::new()
293 HashSet::new()
294 } else if matches.is_present("number") {
294 } else if matches.is_present("number") {
295 [StyleComponent::LineNumbers].iter().cloned().collect()
295 [StyleComponent::LineNumbers].iter().cloned().collect()
@@ -323,7 +323,17 @@ impl App {
323 acc.extend(components.iter().cloned());
323 acc.extend(components.iter().cloned());
328+ // If `grid` is set, remove `rule` as it is a subset of `grid`, and print a warning.
329+ if styled_components.grid() && styled_components.0.remove(&StyleComponent::Rule) {
330+ use ansi_term::Colour::Yellow;
332+ "{}: Style 'rule' is a subset of style 'grid', 'rule' will not be visible.",
333+ Yellow.paint("[bat warning]"),
337+ Ok(styled_components)