]> arthur.barton.de Git - ax-zsh.git/commitdiff
axzshctl wrapper: Clean up the environment when disabling AX-ZSH
authorAlexander Barton <alex@barton.de>
Tue, 28 Dec 2021 13:59:59 +0000 (14:59 +0100)
committerAlexander Barton <alex@barton.de>
Tue, 28 Dec 2021 13:59:59 +0000 (14:59 +0100)
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".