From 160e455ff51ddcb567e9f1b7f108d4397ab754c5 Mon Sep 17 00:00:00 2001 From: Sijmen Schoon Date: Sun, 25 Nov 2018 21:52:21 +0100 Subject: [PATCH] fish: Replace root check with UID check --- config/fish/functions/fish_prompt.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/fish/functions/fish_prompt.fish b/config/fish/functions/fish_prompt.fish index cd4473c..bc82b02 100644 --- a/config/fish/functions/fish_prompt.fish +++ b/config/fish/functions/fish_prompt.fish @@ -29,7 +29,7 @@ function fish_prompt printf '%s\e[K\n' (__fish_git_prompt | sed -r 's/(\x1B\[0?)m/\139m/') - if [ "$USER" = "root" ] + if [ (id -u) -eq "0" ] set_color red echo -n "# " else