feat(sysctl): improve printing the multiline values

This commit is contained in:
Orhun Parmaksız 2021-12-25 16:43:15 +03:00
parent affd73efc7
commit 86f2be4fae
No known key found for this signature in database
GPG key ID: F83424824B3E4B90

View file

@ -118,15 +118,17 @@ impl Parameter {
write!(output, "{}", self.value.bold())?; write!(output, "{}", self.value.bold())?;
} }
DisplayType::Default => { DisplayType::Default => {
for value in self.value.lines() {
writeln!( writeln!(
output, output,
"{} {} {}", "{} {} {}",
self.get_colored_name(config), self.get_colored_name(config),
"=".color(config.default_color), "=".color(config.default_color),
self.value.bold(), value.bold(),
)?; )?;
} }
} }
}
Ok(()) Ok(())
} }