site_rc (497B)
1 local ppath='' name func black skip 2 local -a match mbegin mend rc_functions func_files 3 4 func_files=( $^fpath/site_${~1}_*(N) ) 5 6 for func in $func_files ; do 7 if ! [[ -r "$func" ]]; then 8 print -r >&2 - "$func is not readable" 9 continue 10 fi 11 autoload -Uz $func:t 12 rc_functions+=$func:t 13 done 14 15 for func in ${(o)rc_functions}; do 16 skip=0 17 for black in $site_rc_blacklist; do 18 if [[ $func == $~black ]]; then 19 skip=1 20 break 21 fi 22 done 23 (($skip)) || $func 24 done 25 # vim: ft=zsh noet ts=4 sts=4 sw=4