21 lines
		
	
	
	
		
			452 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
	
		
			452 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
#!/usr/bin/env zsh
 | 
						|
# Eryn Wells <eryn@erynwells.me>
 | 
						|
 | 
						|
autoload load_module
 | 
						|
 | 
						|
function init_zsh_functions
 | 
						|
{
 | 
						|
    local myfpath="$HOME/.zsh/func"
 | 
						|
 | 
						|
    for func in $myfpath/*; do
 | 
						|
        [[ ! -e "$func" || -d "$func" ]] && continue
 | 
						|
 | 
						|
        local functionName=`basename $func`
 | 
						|
        [[ "$functionName" =~ "prompt_*" ]] && continue
 | 
						|
        [[ "$functionName" =~ "init_*" ]] && continue
 | 
						|
 | 
						|
        autoload +X $functionName
 | 
						|
    done
 | 
						|
}
 | 
						|
 | 
						|
init_zsh_functions "$@"
 |