]> arthur.barton.de Git - ax-zsh.git/commitdiff
Refactor "root prompt" handling, don't show root "logname" by default
authorAlexander Barton <alex@barton.de>
Tue, 28 Dec 2021 16:40:08 +0000 (17:40 +0100)
committerAlexander Barton <alex@barton.de>
Tue, 28 Dec 2021 16:40:08 +0000 (17:40 +0100)
But still enable it for the axemoji theme, so no functional changes.

core/40_prompt/40_prompt.zshrc
themes/axemoji.axzshtheme

index aea921d1cb270a9c58867727e70328bdc9c34529..ea252fd0ddbbe953f67feeee61bff1076417487f 100644 (file)
@@ -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=""
index ec1237677109de3a8819fe5ac8131e972eef808c..03d610ead41e5112daf488ffc982099f4453064e 100644 (file)
@@ -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)"