From 7de55844b26394688221b1cd12ef4053b3c7f6c7 Mon Sep 17 00:00:00 2001 From: Bartek Pacia Date: Mon, 23 Jan 2023 19:40:42 +0100 Subject: [PATCH] feat(mlh): add separate prompt symbol for root user (#11451) --- themes/mlh.zsh-theme | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/themes/mlh.zsh-theme b/themes/mlh.zsh-theme index baff3fb63..c059bf850 100644 --- a/themes/mlh.zsh-theme +++ b/themes/mlh.zsh-theme @@ -47,6 +47,10 @@ if [ -z "$MLH_SHELL_SYMBOL" ]; then MLH_SHELL_SYMBOL="$ " fi +if [ -z "$MLH_SHELL_SYMBOL_ROOT" ]; then + MLH_SHELL_SYMBOL_ROOT="# " +fi + # colors USER_COLOR="%F{001}" DEVICE_COLOR="%F{033}" @@ -83,7 +87,11 @@ exit_code() { } 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