X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=018914c7746fbbb53d47254231d4d37018f9255e;hb=8ac2e84c61fe067dc2676cbf4b29d431c209bcf8;hp=1be98f446e9f34249165a84d4393ff4687bbfa9d;hpb=465d477a84336597424c38989c7c9ab0c798d9db;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 1be98f4..018914c 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -88,8 +88,16 @@ # Search path for the cd comman # cdpath=(.. ~) -# Support our own site-functions - [ -d /etc/zsh/site-functions ] && FPATH=/etc/zsh/site-functions:$FPATH +# 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. + [[ -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 # automatically remove duplicates from these arrays typeset -U path cdpath fpath manpath @@ -257,6 +265,7 @@ fi # we don't want to quote/espace URLs on our own... # if autoload -U url-quote-magic ; then # zle -N self-insert url-quote-magic + # zstyle ':url-quote-magic:*' url-metas '*?[]^()~#{}=' # else # print 'Notice: no url-quote-magic available :(' # fi @@ -763,12 +772,6 @@ Run "grml-tips ssl-certificate" if you need further instructions. # {{{ completion stuff -# Where to look for autoloaded function definitions - if [ -d /etc/zsh/completion.d ] ; then - local comp=/etc/zsh/completion.d - for func in $comp/*(N-.:t); . ${comp}/${func} - fi - # called later (via is4 && grmlcomp) # notice: use 'zstyle' for getting current settings # press ^Xh (control-x h) for getting tags in context; ^X? (control-x ?) to run complete_debug with trace output