diff --git a/src/controller.rs b/src/controller.rs index ffc5dd5b..c619b091 100644 --- a/src/controller.rs +++ b/src/controller.rs @@ -15,6 +15,7 @@ use crate::output::OutputType; #[cfg(feature = "paging")] use crate::paging::PagingMode; use crate::printer::{InteractivePrinter, OutputHandle, Printer, SimplePrinter}; +use crate::style::{StyleComponent, StyleComponents}; use clircle::{Clircle, Identifier}; @@ -174,8 +175,19 @@ impl<'b> Controller<'b> { None }; + let mut config = self.config.clone(); + + if self.config.loop_through { + config = Config { + style_components: StyleComponents( + [StyleComponent::Plain].iter().cloned().collect(), + ), + ..self.config.clone() + }; + } + let mut printer: Box = if self.config.loop_through { - Box::new(SimplePrinter::new(self.config)) + Box::new(SimplePrinter::new(&config)) } else { Box::new(InteractivePrinter::new( self.config, diff --git a/tests/integration_tests.rs b/tests/integration_tests.rs index 86ca104f..9b68bf8f 100644 --- a/tests/integration_tests.rs +++ b/tests/integration_tests.rs @@ -1779,7 +1779,7 @@ fn file_with_invalid_utf8_filename() { .arg(file_path.as_os_str()) .assert() .success() - .stdout(" 1 dummy content\n"); + .stdout("dummy content\n"); } #[test]