From: Alexander Barton Date: Tue, 28 Dec 2021 16:40:08 +0000 (+0100) Subject: Refactor "root prompt" handling, don't show root "logname" by default X-Git-Url: https://arthur.barton.de/gitweb/?p=ax-zsh.git;a=commitdiff_plain;h=221baba2f746885221d1bc69251f1196ab409b31 Refactor "root prompt" handling, don't show root "logname" by default But still enable it for the axemoji theme, so no functional changes. --- 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)"