diff options
author | AppleTheGolden <scotsbox@protonmail.com> | 2019-12-09 18:59:02 +0100 |
---|---|---|
committer | Matan Kushner <hello@matchai.me> | 2019-12-09 12:59:02 -0500 |
commit | 3c835ba34bb98dff237d04abefc228600df730d0 (patch) | |
tree | 0879f124141b83516a7711eac2a7ca4392ad971b /src/configs/conda.rs | |
parent | 60a131952424ba9682e49aae701b73ce8f487d2e (diff) |
fix: Truncate long paths in conda environment names (#694)
Environment names created via conda create -p [path] tend to be too long for comfort, so this truncates them.
Diffstat (limited to 'src/configs/conda.rs')
-rw-r--r-- | src/configs/conda.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/configs/conda.rs b/src/configs/conda.rs index 7ce644683..8e3f75a22 100644 --- a/src/configs/conda.rs +++ b/src/configs/conda.rs @@ -5,6 +5,7 @@ use starship_module_config_derive::ModuleConfig; #[derive(Clone, ModuleConfig)] pub struct CondaConfig<'a> { + pub truncation_length: usize, pub symbol: SegmentConfig<'a>, pub environment: SegmentConfig<'a>, pub style: Style, @@ -14,6 +15,7 @@ pub struct CondaConfig<'a> { impl<'a> RootModuleConfig<'a> for CondaConfig<'a> { fn new() -> Self { CondaConfig { + truncation_length: 1, symbol: SegmentConfig { value: "C ", style: None, |