pub fn ansi_strings(&self) -> Vec<ANSIString> {
        let shell = std::env::var("STARSHIP_SHELL").unwrap_or_default();
        let ansi_strings = self
            .segments
            .iter()
            .map(Segment::ansi_string)
            .collect::<Vec<ANSIString>>();

        let mut ansi_strings = match shell.as_str() {
            "bash" => ansi_strings_modified(ansi_strings, shell),
            "zsh" => ansi_strings_modified(ansi_strings, shell),
            _ => ansi_strings,
        };

        ansi_strings.insert(0, self.prefix.ansi_string());
        ansi_strings.push(self.suffix.ansi_string());

        ansi_strings
    }
/// Returns a vector of colored ANSIString elements to be later used with
/// `ANSIStrings()` to optimize ANSI codes
Returns a vector of colored ANSIString elements to be later used with
`ANSIStrings()` to optimize ANSI codes
Returns a vector of colored ANSIString elements to be later used with ` ANSIStrings () ` to optimize ANSI codes
pub fn ansi_strings(&self) -> Vec<ANSIString> {
        let shell = std::env::var("STARSHIP_SHELL").unwrap_or_default();
        let ansi_strings = self
            .segments
            .iter()
            .map(Segment::ansi_string)
            .collect::<Vec<ANSIString>>();
        let mut ansi_strings = match shell.as_str() {
            "bash" => ansi_strings_modified(ansi_strings, shell),
            "zsh" => ansi_strings_modified(ansi_strings, shell),
            _ => ansi_strings,
        };
        ansi_strings.insert(0, self.prefix.ansi_string());
        ansi_strings.push(self.suffix.ansi_string());
        ansi_strings
    }
pub fn ansi_strings ( & self ) -> Vec < ANSIString > { let shell = std :: env :: var ( " " ) . unwrap_or_default ( ) ; let ansi_strings = self . segments . iter ( ) . map ( Segment :: ansi_string ) . collect :: < Vec < ANSIString > > ( ) ; let mut ansi_strings = match shell . as_str ( ) { " " => ansi_strings_modified ( ansi_strings , shell ) , " " => ansi_strings_modified ( ansi_strings , shell ) , _ => ansi_strings , } ; ansi_strings . insert ( 0 , self . prefix . ansi_string ( ) ) ; ansi_strings . push ( self . suffix . ansi_string ( ) ) ; ansi_strings }
Returns a vector of colored ANSIString elements to be later used with
`ANSIStrings()` to optimize ANSI codes
Returns a vector of colored ANSIString elements to be later used with ` ANSIStrings () ` to optimize ANSI codes
&self