]> arthur.barton.de Git - ax-zsh.git/blobdiff - core/99_cleanup/99_cleanup.zlogin
Correctly test XDG_CACHE_HOME for writability for "stamp files"
[ax-zsh.git] / core / 99_cleanup / 99_cleanup.zlogin
index b38939b28bbc6b2616eebee77d703fe18b9c00f1..1971cd07084c77694cd41abf4f324a471d4e2cf0 100644 (file)
@@ -2,21 +2,35 @@
 # 99_cleanup.zlogin: Don't pollute the namespace, remove variables/functions/...
 
 for func (
-       ax_hostname_prompt_root
-       ax_hostname_prompt_yn
-       ax_logname_prompt_root
-       ax_logname_prompt_yn
-       ax_prompt
+       axzsh_hostname_prompt_root
+       axzsh_hostname_prompt_yn
+       axzsh_logname_prompt_root
+       axzsh_logname_prompt_yn
+       axzsh_prompt
 ); do
-       unfunction $func
+       unfunction $func 2>/dev/null
 done
 
-for func ($ax_logname_prompt_functions); do
+for func ($axzsh_logname_prompt_functions); do
        unfunction $func 2>/dev/null
 done
-unset ax_logname_prompt_functions
+unset axzsh_logname_prompt_functions
 
-for func ($ax_hostname_prompt_functions); do
+for func ($axzsh_hostname_prompt_functions); do
        unfunction $func 2>/dev/null
 done
-unset ax_hostname_prompt_functions
+unset axzsh_hostname_prompt_functions
+
+# Try to map OhMyZsh theme Environment ...
+[[ -n "$ZSH_THEME_GIT_PROMPT_AHEAD" ]] \
+       && ZSH_THEME_VCS_PROMPT_AHEAD="$ZSH_THEME_GIT_PROMPT_AHEAD"
+[[ -n "$ZSH_THEME_GIT_PROMPT_CLEAN" ]] \
+       && ZSH_THEME_VCS_PROMPT_CLEAN="$ZSH_THEME_GIT_PROMPT_CLEAN"
+[[ -n "$ZSH_THEME_GIT_PROMPT_DIRTY" ]] \
+       && ZSH_THEME_VCS_PROMPT_DIRTY="$ZSH_THEME_GIT_PROMPT_DIRTY"
+[[ -n "$ZSH_THEME_GIT_PROMPT_PREFIX" ]] \
+       && ZSH_THEME_VCS_PROMPT_PREFIX="$ZSH_THEME_GIT_PROMPT_PREFIX"
+[[ -n "$ZSH_THEME_GIT_PROMPT_SUFFIX" ]] \
+       && ZSH_THEME_VCS_PROMPT_SUFFIX="$ZSH_THEME_GIT_PROMPT_SUFFIX"
+[[ -n "$ZSH_THEME_GIT_PROMPT_UNMERGED" ]] \
+       && ZSH_THEME_VCS_PROMPT_BEHIND="$ZSH_THEME_GIT_PROMPT_UNMERGED"