]> arthur.barton.de Git - ax-zsh.git/blob - core/99_cleanup/99_cleanup.zlogin
99_cleanup: Map OhMyZSH theme variables to ax-zsh variants
[ax-zsh.git] / core / 99_cleanup / 99_cleanup.zlogin
1 # AX-ZSH: Alex' Modular ZSH Configuration
2 # 99_cleanup.zlogin: Don't pollute the namespace, remove variables/functions/...
3
4 for func (
5         ax_hostname_prompt_root
6         ax_hostname_prompt_yn
7         ax_logname_prompt_root
8         ax_logname_prompt_yn
9         ax_prompt
10 ); do
11         unfunction $func 2>/dev/null
12 done
13
14 for func ($ax_logname_prompt_functions); do
15         unfunction $func 2>/dev/null
16 done
17 unset ax_logname_prompt_functions
18
19 for func ($ax_hostname_prompt_functions); do
20         unfunction $func 2>/dev/null
21 done
22 unset ax_hostname_prompt_functions
23
24 # Try to map OhMyZsh theme Environment ...
25 [[ -n "$ZSH_THEME_GIT_PROMPT_AHEAD" ]] \
26         && ZSH_THEME_VCS_PROMPT_AHEAD="$ZSH_THEME_GIT_PROMPT_AHEAD"
27 [[ -n "$ZSH_THEME_GIT_PROMPT_CLEAN" ]] \
28         && ZSH_THEME_VCS_PROMPT_CLEAN="$ZSH_THEME_GIT_PROMPT_CLEAN"
29 [[ -n "$ZSH_THEME_GIT_PROMPT_DIRTY" ]] \
30         && ZSH_THEME_VCS_PROMPT_DIRTY="$ZSH_THEME_GIT_PROMPT_DIRTY"
31 [[ -n "$ZSH_THEME_GIT_PROMPT_PREFIX" ]] \
32         && ZSH_THEME_VCS_PROMPT_PREFIX="$ZSH_THEME_GIT_PROMPT_PREFIX"
33 [[ -n "$ZSH_THEME_GIT_PROMPT_SUFFIX" ]] \
34         && ZSH_THEME_VCS_PROMPT_SUFFIX="$ZSH_THEME_GIT_PROMPT_SUFFIX"
35 [[ -n "$ZSH_THEME_GIT_PROMPT_UNMERGED" ]] \
36         && ZSH_THEME_VCS_PROMPT_BEHIND="$ZSH_THEME_GIT_PROMPT_UNMERGED"