From 8625936aefd76ac404f42b6fcaf77c925a7aaf94 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Tue, 28 Dec 2021 14:59:59 +0100 Subject: [PATCH] axzshctl wrapper: Clean up the environment when disabling AX-ZSH --- core/40_axzsh/40_axzsh.zshrc | 4 ++++ 1 file changed, 4 insertions(+) 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". -- 2.39.2