site_zshrc_85_aliasinit (444B)
1 emulate -L zsh 2 setopt extendedglob 3 local ppath='' name func 4 local -a match mbegin mend alias_functions 5 for func in $^fpath/alias_setup_*(N) 6 do 7 if [[ $func = */alias_setup_(#b)(*) ]] 8 then 9 name="$match[1]" 10 if [[ -r "$func" ]] && (($+commands[$name])) 11 then 12 alias_functions+=$func:t 13 autoload -Uz $func:t 14 fi 15 else 16 print "Eh? Mismatch between glob patterns in aliasinit." 17 fi 18 done 19 for func in ${(o)alias_functions}; do 20 $func 21 done