diff --git a/completion.zsh b/completion.zsh index e25805b..3aa44a6 100644 --- a/completion.zsh +++ b/completion.zsh @@ -4,6 +4,14 @@ # tab completion configuration # +# add an autoload function path, if directory exists +# http://www.zsh.org/mla/users/2002/msg00232.html +functionsd="$HOME/.zsh/functions.d" +if [[ -d "$functionsd" ]] { + fpath=( $functionsd $fpath ) + autoload -U $functionsd/*(:t) +} + # load completions system zmodload -i zsh/complist diff --git a/zshrc b/zshrc index 2cba05b..e08cf4e 100644 --- a/zshrc +++ b/zshrc @@ -31,6 +31,7 @@ sources+="$HOME/.zsh/$systemFile.zsh" # Finally include the private.zsh file sources+="$HOME/.zsh/private.zsh" +# try to include all sources foreach file (`echo $sources`) if [[ -a $file ]]; then source $file