From 22dc419a3e0bee5d9a7ea72900b8503e9bd014fc Mon Sep 17 00:00:00 2001 From: Zhenhui Xie Date: Tue, 7 Apr 2020 01:16:18 +0800 Subject: improvement: add parser for format strings (#1021) This PR implements the parser of format strings described in #624. --- src/segment.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/segment.rs') diff --git a/src/segment.rs b/src/segment.rs index d01034bb0..73e24b9a8 100644 --- a/src/segment.rs +++ b/src/segment.rs @@ -4,15 +4,16 @@ use std::fmt; /// A segment is a single configurable element in a module. This will usually /// contain a data point to provide context for the prompt's user /// (e.g. The version that software is running). +#[derive(Clone)] pub struct Segment { /// The segment's name, to be used in configuration and logging. - _name: String, + pub _name: String, /// The segment's style. If None, will inherit the style of the module containing it. - style: Option