silver 2.0.0

A cross-shell customizable powerline-like prompt with icons
1
2
3
4
5
6
7
8
9
10
11
12
use crate::Segment;
use std::{env, path::Path};

pub fn segment(segment: &mut Segment, _: &[&str]) {
    segment.value = Path::new(&env::var("VIRTUAL_ENV").unwrap_or_default())
        .iter()
        .last()
        .unwrap_or_default()
        .to_str()
        .unwrap()
        .to_owned();
}