From 699f8f9988423af54e79bd3988a93075c259765b Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 15 Jul 2021 02:57:25 +0200 Subject: [PATCH] Change prompt username coloring --- functions/fish_prompt.fish | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/functions/fish_prompt.fish b/functions/fish_prompt.fish index 1bb0587..24c93cb 100644 --- a/functions/fish_prompt.fish +++ b/functions/fish_prompt.fish @@ -5,18 +5,19 @@ function fish_prompt # User name - if test "$UID" -eq 0 + switch ~ + case "/root/" # Root set_color brred - else if test "$UID" -lt 1000 + case "/srv/*" # System account set_color brpurple - else if test "$UID" -ge 60000 - # Temporary account - set_color brcyan - else + case "/home/*" # Regular user set_color brgreen + case "*" + # Temporary account + set_color brcyan end echo -n "$USER"