diff options
author | Jon Grythe Stødle <jonstodle@outlook.com> | 2020-01-02 05:19:08 +0100 |
---|---|---|
committer | Matan Kushner <hello@matchai.me> | 2020-01-01 23:19:08 -0500 |
commit | 8e5fa60fc8dbea2274284b120fdb454bbfea2fc9 (patch) | |
tree | 6dc0df93bbb1b99a9d682c222b4e99749044c3a0 /src/segment.rs | |
parent | 6bafe4cd66ef89b309da4c6b280a56c41a56e74e (diff) |
feat: Add the `starship explain` command (#699)
This adds the explain argument to Starship, which explains what the printed modules in the prompt are.
Diffstat (limited to 'src/segment.rs')
-rw-r--r-- | src/segment.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/segment.rs b/src/segment.rs index 8c0140ac1..d01034bb0 100644 --- a/src/segment.rs +++ b/src/segment.rs @@ -45,6 +45,11 @@ impl Segment { self } + /// Gets the value of the segment. + pub fn get_value(&self) -> &str { + &self.value + } + // Returns the ANSIString of the segment value, not including its prefix and suffix pub fn ansi_string(&self) -> ANSIString { match self.style { |