diff options
author | Zhenhui Xie <xiezh0831@yahoo.co.jp> | 2020-04-07 01:16:18 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-06 13:16:18 -0400 |
commit | 22dc419a3e0bee5d9a7ea72900b8503e9bd014fc (patch) | |
tree | b3102feac3af53c2e0f4e818583ae6e8bf379cbb /src/segment.rs | |
parent | 3510bfe0444c2bf4e8cf3e42fdf13fde8c05568f (diff) |
improvement: add parser for format strings (#1021)
This PR implements the parser of format strings described in #624.
Diffstat (limited to 'src/segment.rs')
-rw-r--r-- | src/segment.rs | 7 |
1 files changed, 4 insertions, 3 deletions
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<Style>, + pub style: Option<Style>, /// The string value of the current segment. - value: String, + pub value: String, } impl Segment { |