From: Alexander Barton Date: Sun, 27 Sep 2015 18:19:51 +0000 (+0200) Subject: New core module "99_cleanup" X-Git-Url: https://arthur.barton.de/gitweb/?p=ax-zsh.git;a=commitdiff_plain;h=96e73cb881425826238be0194df1899e4c5e46dc New core module "99_cleanup" Don't pollute the namespace, remove variables/functions/... --- diff --git a/core/99_cleanup/99_cleanup.zlogin b/core/99_cleanup/99_cleanup.zlogin new file mode 100644 index 0000000..eb6debc --- /dev/null +++ b/core/99_cleanup/99_cleanup.zlogin @@ -0,0 +1,21 @@ +# AX-ZSH: Alex' Modular ZSH Configuration +# 99_cleanup.zlogin: Don't pollute the namespace, remove variables/functions/... + +for func ( + ax_hostname_prompt_root + ax_hostname_prompt_yn + ax_logname_prompt_root + ax_logname_prompt_yn +); do + unfunction $func +done + +for func ($ax_logname_prompt_functions); do + unfunction $func 2>/dev/null +done +unset ax_logname_prompt_functions + +for func ($ax_hostname_prompt_functions); do + unfunction $func 2>/dev/null +done +unset ax_hostname_prompt_functions diff --git a/core/99_cleanup/99_cleanup.zshrc b/core/99_cleanup/99_cleanup.zshrc new file mode 100644 index 0000000..eefb842 --- /dev/null +++ b/core/99_cleanup/99_cleanup.zshrc @@ -0,0 +1,6 @@ +# AX-ZSH: Alex' Modular ZSH Configuration +# 99_cleanup.zshrc: Don't pollute the namespace, remove variables/functions/... + +[[ -o login ]] && return + +source "$AXZSH/core/99_cleanup/99_cleanup.zlogin"