emulate -L zsh setopt extendedglob local ppath='' name func local -a match mbegin mend alias_functions for func in $^fpath/alias_setup_*(N) do if [[ $func = */alias_setup_(#b)(*) ]] then name="$match[1]" if [[ -r "$func" ]] && (($+commands[$name])) then alias_functions+=$func:t autoload -Uz $func:t fi else print "Eh? Mismatch between glob patterns in aliasinit." fi done for func in ${(o)alias_functions}; do $func done