From 221baba2f746885221d1bc69251f1196ab409b31 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Tue, 28 Dec 2021 17:40:08 +0100 Subject: [PATCH] Refactor "root prompt" handling, don't show root "logname" by default But still enable it for the axemoji theme, so no functional changes. --- core/40_prompt/40_prompt.zshrc | 2 -- themes/axemoji.axzshtheme | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/40_prompt/40_prompt.zshrc b/core/40_prompt/40_prompt.zshrc index aea921d..ea252fd 100644 --- a/core/40_prompt/40_prompt.zshrc +++ b/core/40_prompt/40_prompt.zshrc @@ -32,8 +32,6 @@ function axzsh_logname_prompt_yn() { done } -axzsh_logname_prompt_functions=(axzsh_logname_prompt_root) - # Hostname ZSH_THEME_HOSTNAME_PROMPT_PREFIX_SPACING="" diff --git a/themes/axemoji.axzshtheme b/themes/axemoji.axzshtheme index ec12376..03d610e 100644 --- a/themes/axemoji.axzshtheme +++ b/themes/axemoji.axzshtheme @@ -31,6 +31,8 @@ else RPS1="%(?..%{$fg_no_bold[red]%}<%?>%{$reset_color%})" fi +axzsh_logname_prompt_functions=($axzsh_logname_prompt_functions axzsh_logname_prompt_root) + # The primary prompt string, printed before a command is read. PS1="${system_emoji}${emoji_spacing} $(axzsh_logname_prompt_yn)$(axzsh_hostname_prompt_yn)%B%2~%b"'$(axzsh_vcs_prompt)'"$(axzsh_prompt)" -- 2.39.2