1
0
mirror of https://github.com/sharkdp/bat synced 2026-07-23 17:03:18 +00:00

First StyleComponentList should remove from 'auto' style.

This happens when there are no `--style` arguments other than the one
passed in as a command line argument.

Prior to this change, removing a style component (e.g. `--style=-numbers`)
would remove the component from an empty style component set, resulting
in no styles at all. That behaviour was less intuitive than the new
behaviour, which starts out with the default components and
removes the line numbers.
This commit is contained in:
Ethan P.
2024-06-10 17:39:55 -07:00
parent 180a77ee99
commit aa3ec109b7
2 changed files with 43 additions and 13 deletions
+1 -1
View File
@@ -405,7 +405,7 @@ impl App {
.map(|v| StyleComponentList::from_str(v))
.collect::<Result<Vec<StyleComponentList>>>()?;
StyleComponentList::to_components(lists, self.interactive_output)
StyleComponentList::to_components(lists, self.interactive_output, true)
}
// Use the default.