From adee5513dffe6d3cb0622a23e1af0edc23819701 Mon Sep 17 00:00:00 2001 From: qimiko <25387744+qimiko@users.noreply.github.com> Date: Mon, 20 Mar 2023 13:51:42 -0700 Subject: [PATCH] add current profile indicator --- src/profile.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/profile.rs b/src/profile.rs index 124a1c5..ce1e516 100644 --- a/src/profile.rs +++ b/src/profile.rs @@ -62,8 +62,15 @@ pub fn subcommand(config: &mut Config, cmd: Profile) { let name = &profile.borrow().name; let path = &profile.borrow().gd_path; + let indicator = if config.current_profile.as_ref() == Some(name) { + "* " + } else { + "" + }; + println!( - "{} [ path = {} ]", + "{}{} [ path = {} ]", + indicator.bright_cyan(), name.bright_cyan(), path.to_string_lossy().bright_green() );