Unverified Commit 7de55844 authored by Bartek Pacia's avatar Bartek Pacia Committed by GitHub

feat(mlh): add separate prompt symbol for root user (#11451)

parent a1c54e03
...@@ -47,6 +47,10 @@ if [ -z "$MLH_SHELL_SYMBOL" ]; then ...@@ -47,6 +47,10 @@ if [ -z "$MLH_SHELL_SYMBOL" ]; then
MLH_SHELL_SYMBOL="$ " MLH_SHELL_SYMBOL="$ "
fi fi
if [ -z "$MLH_SHELL_SYMBOL_ROOT" ]; then
MLH_SHELL_SYMBOL_ROOT="# "
fi
# colors # colors
USER_COLOR="%F{001}" USER_COLOR="%F{001}"
DEVICE_COLOR="%F{033}" DEVICE_COLOR="%F{033}"
...@@ -83,7 +87,11 @@ exit_code() { ...@@ -83,7 +87,11 @@ exit_code() {
} }
prompt_end() { prompt_end() {
if [ "$UID" -eq 0 ]; then
printf "\n$MLH_SHELL_SYMBOL_ROOT"
else
printf "\n$MLH_SHELL_SYMBOL" printf "\n$MLH_SHELL_SYMBOL"
fi
} }
# Set git_prompt_info text # Set git_prompt_info text
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment