mirror of
https://github.com/starship/starship.git
synced 2026-06-24 02:01:36 +07:00
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:
@@ -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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user