mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-25 15:58:57 +01:00
feat(mlh): add separate prompt symbol for root user (#11451)
This commit is contained in:
parent
a1c54e03f9
commit
7de55844b2
@ -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() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
prompt_end() {
|
prompt_end() {
|
||||||
printf "\n$MLH_SHELL_SYMBOL"
|
if [ "$UID" -eq 0 ]; then
|
||||||
|
printf "\n$MLH_SHELL_SYMBOL_ROOT"
|
||||||
|
else
|
||||||
|
printf "\n$MLH_SHELL_SYMBOL"
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Set git_prompt_info text
|
# Set git_prompt_info text
|
||||||
|
Loading…
Reference in New Issue
Block a user