# 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'
#m# k ESC-h Call \kbd{run-help} for the 1st word on the command line
alias run-help >&/dev/null && unalias run-help
-for rh in run-help{,-git,-svk,-svn}; do
+for rh in run-help{,-git,-ip,-openssl,-p4,-sudo,-svk,-svn}; do
zrcautoload $rh
done; unset rh
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
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
file="${file:t}"
if [[ -d ${jumpd} ]] ; then
- builtin cd "${jumpd}" || RTN=1
+ builtin cd -q "${jumpd}" || RTN=1
fi
file=$(readlink "$file")
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
if (( ${#} >= 1 )) ; then
print ""
fi
- builtin cd "${curdir}"
+ builtin cd -q "${curdir}"
done
return ${RTN}
}
}
# make sure our environment is clean regarding colors
-builtin unset -v BLUE RED GREEN CYAN YELLOW MAGENTA WHITE
+builtin unset -v BLUE RED GREEN CYAN YELLOW MAGENTA WHITE NO_COLOR
# "persistent history"
# just write important commands you always need to $GRML_IMPORTANT_COMMANDS