- [[ -d /etc/zsh/completion.d ]] && fpath+=( /etc/zsh/completion.d )
- if [[ -d /etc/zsh/functions.d ]] ; then
- fpath+=( /etc/zsh/functions.d )
- for func in /etc/zsh/functions.d/[^_]*[^~] ; do
- autoload -U ${func:t}
- done
+ if [ -n "$BROKEN_COMPLETION_DIR" ] ; then
+ print 'Warning: not setting completion directories because broken files have been found.'>&2
+ else
+ [[ -d /etc/zsh/completion.d ]] && fpath+=( /etc/zsh/completion.d )
+ if [[ -d /etc/zsh/functions.d ]] ; then
+ fpath+=( /etc/zsh/functions.d )
+ for func in /etc/zsh/functions.d/[^_]*[^~] ; do
+ autoload -U ${func:t}
+ done
+ fi