From 822d7da6cc41606a4303f53f1f01aada9153969f Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 11 Mar 2021 17:58:39 +0100 Subject: Base: Make the default prompt a different color for root --- Base/etc/shellrc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Base/etc') diff --git a/Base/etc/shellrc b/Base/etc/shellrc index a116474707..60426a4178 100644 --- a/Base/etc/shellrc +++ b/Base/etc/shellrc @@ -31,4 +31,10 @@ alias rgrep="grep -r" alias egrep="grep -E" alias ll='ls -l' -export PROMPT="\\X\\u@\\h:\\w\\a\\e[32;1m@\\h\\e[0m:\\e[34;1m\\w\\e[0m \\p " +if [ "$(id -u)" = "0" ] { + prompt_color=31 +} else { + prompt_color=32 +} + +export PROMPT="\\X\\u@\\h:\\w\\a\\e[$prompt_color;1m@\\h\\e[0m:\\e[34;1m\\w\\e[0m \\p " -- cgit v1.2.3