From 463ec260247fa0e62d2ea14e237681a499955392 Mon Sep 17 00:00:00 2001 From: Matan Kushner Date: Tue, 2 Jul 2019 16:12:53 -0400 Subject: feat: Add a `disabled` configuration option for modules (#86) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Add support for the disabled configuration option This will allow you to selectively disable modules that you don't want or need. 😄 • Overwrite starship configuration file path with STARSHIP_CONFIG environment variable • Write tests for the two configuration options that are available --- src/modules/line_break.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/modules/line_break.rs') diff --git a/src/modules/line_break.rs b/src/modules/line_break.rs index 0b11367ec..b86f85e38 100644 --- a/src/modules/line_break.rs +++ b/src/modules/line_break.rs @@ -1,10 +1,10 @@ use super::{Context, Module}; /// Creates a segment for the line break -pub fn segment<'a>(context: &'a Context) -> Option> { +pub fn module<'a>(context: &'a Context) -> Option> { const LINE_ENDING: &str = "\n"; - let mut module = context.new_module("line_break"); + let mut module = context.new_module("line_break")?; module.get_prefix().set_value(""); module.get_suffix().set_value(""); -- cgit v1.2.3