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