X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=etc%2Fzsh%2Fzshrc;h=1ffc6f25359ca8c54aec24cb68df0f4695f06a3b;hb=c5383b10d449697922b6da3262b63a95ed5cc83d;hp=dfd615935edf3b45f4506f09e8ec18df14c67201;hpb=b71bff06b3fc95f880abe194fa2a958ee6b179bc;p=grml-etc-core.git diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index dfd6159..1ffc6f2 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -615,13 +615,11 @@ isdarwin && xsource /sw/bin/init.sh # load our function and completion directories for fdir in /usr/share/grml/zsh/completion /usr/share/grml/zsh/functions; do fpath=( ${fdir} ${fdir}/**/*(/N) ${fpath} ) - if [[ ${fdir} == '/usr/share/grml/zsh/functions' ]] ; then - for func in ${fdir}/**/[^_]*[^~](N.) ; do - zrcautoload ${func:t} - done - fi done -unset fdir func +typeset -aU ffiles +ffiles=(/usr/share/grml/zsh/functions/**/[^_]*[^~](N.:t)) +(( ${#ffiles} > 0 )) && autoload -U "${ffiles[@]}" +unset -v fdir ffiles # support colors in less export LESS_TERMCAP_mb=$'\E[01;31m' @@ -2824,8 +2822,8 @@ function sll () { fi local file jumpd curdir - local -i RTN LINODE i - local -a SEENINODES + local -i 10 RTN LINODE i + local -a SEENINODES curdir="${PWD}" RTN=0 @@ -2838,8 +2836,8 @@ function sll () { LINODE=$(zstat -L +inode "${file}") for i in ${SEENINODES} ; do if (( ${i} == ${LINODE} )) ; then - builtin cd "${curdir}" - print "link loop detected, aborting!" + builtin cd -q "${curdir}" + print 'link loop detected, aborting!' return 2 fi done @@ -2849,7 +2847,7 @@ function sll () { file="${file:t}" if [[ -d ${jumpd} ]] ; then - builtin cd "${jumpd}" || RTN=1 + builtin cd -q "${jumpd}" || RTN=1 fi file=$(readlink "$file") @@ -2857,7 +2855,7 @@ function sll () { file="${file:t}" if [[ -d ${jumpd} ]] ; then - builtin cd "${jumpd}" || RTN=1 + builtin cd -q "${jumpd}" || RTN=1 fi ls -l "${PWD}/${file}" || RTN=1 @@ -2866,7 +2864,7 @@ function sll () { if (( ${#} >= 1 )) ; then print "" fi - builtin cd "${curdir}" + builtin cd -q "${curdir}" done return ${RTN} }