diff options
author | Kevin Song <chipbuster@users.noreply.github.com> | 2019-09-07 19:33:06 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-07 19:33:06 -0500 |
commit | 9721666d331ddfd7a04bbb434cccf38b44701b00 (patch) | |
tree | 8edb32e1cebc6951451953a311cd9cfb4447712d /src/modules/nix_shell.rs | |
parent | 3e5cac98522feca856867e32cf3df52ff0285c62 (diff) |
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.
Diffstat (limited to 'src/modules/nix_shell.rs')
-rw-r--r-- | src/modules/nix_shell.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/nix_shell.rs b/src/modules/nix_shell.rs index b37fcdcf4..5fc98dfc9 100644 --- a/src/modules/nix_shell.rs +++ b/src/modules/nix_shell.rs @@ -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 }) |