use std::env::current_dir as current_dir; //use std::env::var_os as var_os; use std::env::args as args; use colored::Colorize; fn main() -> std::io::Result<()> { let angle = "❯"; let pwd = current_dir()?; let dir = pwd.display().to_string(); let args: Vec = args().collect(); let shell: String; if args.len() > 1 { shell = args[1].clone(); } else { shell = "none".to_string(); } let shell_char = match shell.as_str() { "bash" => "", "zsh" => "󰰶", "fish" => "󰈺", "nushell" => "", "ion" => "", _ => "󱆃", }; /* match var_os(USER).as_str() { "root" => { shell_char = shell_char.truecolor(255,53,94); }, _ => { shell_char = shell_char.truecolor(54,178,91); } }*/ print!("{} {}{} ", shell_char.truecolor(75,75,75), dir.italic().truecolor(75,75,75), angle.truecolor(0, 255, 180), ); Ok(()) }