]> arthur.ath.cx Git - ax-zsh.git/blobdiff - core/40_axzsh/40_axzsh.zshrc
axzshctl wrapper: Clean up the environment when disabling AX-ZSH
[ax-zsh.git] / core / 40_axzsh / 40_axzsh.zshrc
index be6f0b82c15c6e2ee56bee9072b50a88ffd77831..f9d3894b261678ae0d07ec83e3349f48e92c7b01 100644 (file)
@@ -4,6 +4,10 @@
 function axzshctl() {
        zsh "$AXZSH/bin/axzshctl" "$@" || return $?
 
+       if [[ "$1" = "disable" ]]; then
+               unset AXZSH AXZSH_FPATH AXZSH_ZLOGIN_READ AXZSH_ZPROFILE_READ
+       fi
+
        case "$1" in
                "disable"*|"enable"*|"reset"*|"set"*|"up"*)
                        # Command which potentially "changed state".