zshlibs/zconfig/zconfig_checkload

15 lines
411 B
Plaintext
Raw Normal View History

2024-01-18 15:29:40 +00:00
function zconfig_checkload()
{
typeset -a -g zconfig_loaded
if [[ ! ${zconfig_loaded[(r)${1}]} ]]
then
zshlibs_log zconfig "sourcing config '$1'"
. -- $1 2>&1 >(zshlibs_log zconfig)
zconfig_loaded+=("$1")
zshlibs_log zconfig "end sourcing config '$1'"
else
zshlibs_log zconfig "config '$1' already loaded"
zshlibs_log zconfig "currently loaded configs: ${zconfig_loaded}"
fi
}