From: Alexander Barton Date: Tue, 28 Dec 2021 13:59:59 +0000 (+0100) Subject: axzshctl wrapper: Clean up the environment when disabling AX-ZSH X-Git-Url: https://arthur.barton.de/gitweb/?p=ax-zsh.git;a=commitdiff_plain;h=8625936aefd76ac404f42b6fcaf77c925a7aaf94 axzshctl wrapper: Clean up the environment when disabling AX-ZSH --- diff --git a/core/40_axzsh/40_axzsh.zshrc b/core/40_axzsh/40_axzsh.zshrc index be6f0b8..f9d3894 100644 --- a/core/40_axzsh/40_axzsh.zshrc +++ b/core/40_axzsh/40_axzsh.zshrc @@ -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".