X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=f7c332b624d2f03c0299d155e4846f5a209c8983;hb=b5070ac43c7fc3a280526aaa172a901862198c8b;hp=f2e1b3958f672b8ce69bf97da93c963f3c0e2ef1;hpb=5c716b322f326200b851bdd3c8751cb1ab475e6e;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index f2e1b39..f7c332b 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -598,22 +598,16 @@ fi # do Fink setup on darwin isdarwin && xsource /sw/bin/init.sh -# completion functions go to /etc/zsh/completion.d -# function files may be put into /etc/zsh/functions.d, from where they -# will be automatically autoloaded. -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=( $fpath /etc/zsh/completion.d ) - if [[ -d /etc/zsh/functions.d ]] ; then - fdir='/etc/zsh/functions.d' - fpath=( ${fdir} ${fdir}/**/*(/N) ${fpath} ) +# load our function and completion directories +for fdir in /usr/share/grml/zsh/completion /usr/share/grml/functions; do + fpath=( ${fdir} ${fdir}/**/*(/N) ${fpath} ) + if [[ ${fpath} == '/usr/share/grml/zsh/functions' ]] ; then for func in ${fdir}/**/[^_]*[^~](N.) ; do zrcautoload ${func:t} done - unset fdir fi -fi +done +unset fdir func # support colors in less export LESS_TERMCAP_mb=$'\E[01;31m'