BTS

Message984

Author ft1
Recipients ft, mika, z3ttacht
Date 2007-12-07.07:31:17
Content
Michael Prokop <bts@bts.grml.org>:
> > Thanks for your work, works really fine. The only remaining issue is the 
> > 'xsource' stuff we (ft + me) were talking about via ICQ. Keeping the bugreport 
> > open therefore.

Okay, here's a fix. It's very simple and will not change anything for
anyone. I'll comment on the export and append a clean one:

[...]
> -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"
> +

Doing this manually for '.zshrc.global' doesn't hurt too much, and it
solves the case.

[...]
>  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

Adding further information to the warning message. Because code, that
depends on stuff in the global file will make that code fail.

[...]
> -if type xsource &>/dev/null ; then
> -    xsource "${HOME}/.zshrc.local"
> -else
> -    . "${HOME}/.zshrc.local"
> -fi
> +xsource "${HOME}/.zshrc.local"

If the global file was sourced (which it *really* *should*), we can
depend on code from it unconditionally here. So we should just do it,
and expect user's who use the setup on non-grml-systems to follow the
instructions from the reference card (which we do not need to change
with this solution).

Comments? .o( Though, I really think this is the way to go. )

Regards, Frank
Files
File name Uploaded
grml-etc-core-1of1-334ccd4978ac.diff ft1, 2007-12-07.07:31:16
History
Date User Action Args
2007-12-07 07:31:18ft1setrecipients: + mika, ft
2007-12-07 07:31:18ft1linkissue354 messages
2007-12-07 07:31:17ft1create