From 1dda332ef8a0fe126318794e6680e469e586835f Mon Sep 17 00:00:00 2001 From: Frank Terbeck Date: Wed, 9 Mar 2011 11:15:38 +0100 Subject: [PATCH] Make sure grmlzshrc is only loaded once It may happen, that /etc/zsh/zshrc and ~/.zshrc are both the same file, in which case everything is loaded twice. This should fix the issue. --- etc/zsh/zshrc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index b56cd09..f9d51b2 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -103,6 +103,14 @@ # *all* aliases, for example, use @@INSERT-aliases-all@@. #}}} +# Only load once +[[ ${(t)GRML} != *association* ]] && typeset -gA GRML +if (( ${GRML[ZSHRC_LOADED]} )); then + return 0 +else + GRML[ZSHRC_LOADED]=1 +fi + # zsh profiling {{{ # just execute 'ZSH_PROFILE_RC=1 zsh' and run 'zprof' to get the details if [[ $ZSH_PROFILE_RC -gt 0 ]] ; then -- 2.1.4