feat: Add the ability to configure per-module color styles (#285)

Add parsing logic, config support, docs, and integration with other modules 
for custom styling of each module.
This commit is contained in:
Kevin Song
2019-09-07 19:33:06 -05:00
committed by GitHub
parent 3e5cac9852
commit 9721666d33
21 changed files with 485 additions and 184 deletions
+4 -2
View File
@@ -46,8 +46,10 @@ pub fn module<'a>(context: &'a Context) -> Option<Module<'a>> {
}
})
.map(|segment| {
let module_color = Color::Red.bold();
module.set_style(module_color);
let module_style = module
.config_value_style("style")
.unwrap_or_else(|| Color::Red.bold());
module.set_style(module_style);
module.new_segment("nix_shell", &segment);
module
})