# HG changeset patch # User Frank Terbeck # Date 1197011858 -3600 # Node ID 334ccd4978ac4d7e4f774bbdb8b876c7570a0d81 # Parent 92db738ed082088d53b8d36bcc023765fafcf3e9 Fix the 'xsource' issue I think this is the way to go, if we do not want trouble for people, who use the method advised in the grml-zsh-refcard. Personally, I would prefer if the global zshrc is *always* sourced *before* the user-specific one. But this change is so trivial, that telling people how to update to newer versions would be a far bigger hassle. diff -r 92db738ed082 -r 334ccd4978ac etc/skel/.zshrc --- a/etc/skel/.zshrc Thu Dec 06 23:28:05 2007 +0100 +++ b/etc/skel/.zshrc Fri Dec 07 08:17:38 2007 +0100 @@ -7,19 +7,22 @@ ################################################################################ # source ~/.zshrc.global {{{ + # see /etc/zsh/zshrc for some general settings # If you don't have write permissions to /etc/zsh/zshrc on your own # copy the file to your $HOME as /.zshrc.global and we source it: -if type xsource &>/dev/null ; then - xsource "${HOME}/.zshrc.global" -else - . "${HOME}/.zshrc.global" -fi + +# Note, that xsource() is defined in the global file, so here, +# we will have to do the sourcing manually for once: + + [[ -r "${HOME}/.zshrc.global" ]] && source "${HOME}/.zshrc.global" + # }}} # check whether global file has been read {{{ if [[ -z "$ZSHRC_GLOBAL_HAS_BEEN_READ" ]] ; then - print 'Warning: global zsh config has not been read'>&2 + print 'Warning: global zsh config has not been read.' >&2 + print ' prepare for possible errors!' >&2 fi # }}} @@ -1247,11 +1250,7 @@ gethgsnap() { # this allows us to stay in sync with /etc/skel/.zshrc # through 'ln -s /etc/skel/.zshrc ~/.zshrc' and put own # modifications in ~/.zshrc.local -if type xsource &>/dev/null ; then - xsource "${HOME}/.zshrc.local" -else - . "${HOME}/.zshrc.local" -fi +xsource "${HOME}/.zshrc.local" # ...and remove utility functions again. xunfunction