]> arthur.barton.de Git - ax-zsh.git/blobdiff - core/50_prompt/50_prompt.zshrc
50_prompt: Mark more variables as local & internal
[ax-zsh.git] / core / 50_prompt / 50_prompt.zshrc
index 6eb7f1278fcddfd8c599293cfcdcc9b854ed120c..b28720b73a60ab14e00f5145bce4a7309d4f5e47 100644 (file)
@@ -27,7 +27,7 @@ function ax_logname_prompt_yn() {
        done
 }
 
-ax_logname_prompt_functions=()
+ax_logname_prompt_functions=(ax_logname_prompt_root)
 
 # Hostname
 
@@ -54,15 +54,23 @@ ax_hostname_prompt_functions=()
 
 # VCS
 
+if axzsh_is_utf_terminal; then
+       clean="✔"; dirty="✘"; ahead="→"; behind="←"
+else
+       clean="+"; dirty="x"; ahead=">"; behind="<"
+fi
+
 ZSH_THEME_VCS_PROMPT_PREFIX_SPACING="("
 ZSH_THEME_VCS_PROMPT_PREFIX="%{$fg_no_bold[yellow]%}"
 ZSH_THEME_VCS_PROMPT_SUFFIX="%{$reset_color%}"
 ZSH_THEME_VCS_PROMPT_SUFFIX_SPACING=")"
 
-ZSH_THEME_VCS_PROMPT_CLEAN=" %{$fg_no_bold[green]%}✔"
-ZSH_THEME_VCS_PROMPT_DIRTY=" %{$fg_no_bold[red]%}✘"
-ZSH_THEME_VCS_PROMPT_AHEAD="%{$fg_no_bold[cyan]%}→"
-ZSH_THEME_VCS_PROMPT_BEHIND="%{$fg_no_bold[blue]%}←"
+ZSH_THEME_VCS_PROMPT_CLEAN=" %{$fg_no_bold[green]%}$clean"
+ZSH_THEME_VCS_PROMPT_DIRTY=" %{$fg_no_bold[red]%}$dirty"
+ZSH_THEME_VCS_PROMPT_AHEAD="%{$fg_no_bold[cyan]%}$ahead"
+ZSH_THEME_VCS_PROMPT_BEHIND="%{$fg_no_bold[blue]%}$behind"
+
+unset clean dirty ahead behind
 
 function ax_vcs_prompt() {
        local func