summaryrefslogtreecommitdiff
path: root/Base/etc
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-03-11 17:58:39 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-11 18:55:16 +0100
commit822d7da6cc41606a4303f53f1f01aada9153969f (patch)
tree63a84f8d2eb0036d0b26fb471edc6f39517909b7 /Base/etc
parent4b99dbe644187266c7a75d978639c9f20d0afa97 (diff)
downloadserenity-822d7da6cc41606a4303f53f1f01aada9153969f.zip
Base: Make the default prompt a different color for root
Diffstat (limited to 'Base/etc')
-rw-r--r--Base/etc/shellrc8
1 files changed, 7 insertions, 1 deletions
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 "