[zsh] Do a bunch of profiling and clean up all my init functions -- shell init is so much faster now!

This commit is contained in:
Eryn Wells 2022-01-22 10:13:05 -08:00
parent 7e126fe703
commit 1c2e9025cf
11 changed files with 135 additions and 185 deletions

View file

@ -3,19 +3,14 @@
autoload load_module
function init_zsh_functions
{
local myfpath="$HOME/.zsh/func"
local myfpath="$HOME/.zsh/func"
for func in $myfpath/*; do
[[ ! -e "$func" || -d "$func" ]] && continue
for func in $myfpath/*; do
[[ ! -e "$func" || -d "$func" ]] && continue
local functionName=`basename $func`
[[ "$functionName" =~ "prompt_*" ]] && continue
[[ "$functionName" =~ "init_*" ]] && continue
local functionName=`basename $func`
[[ "$functionName" =~ "prompt_*" ]] && continue
[[ "$functionName" =~ "init_*" ]] && continue
autoload +X $functionName
done
}
init_zsh_functions "$@"
autoload -Uz $functionName
done