From 6c1fb551ba0973c9a86e1ea479d553d66c6bf6b7 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 15 Apr 1999 18:24:09 +0000 Subject: zsh-3.1.5-pws-14 --- Src/init.c | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'Src/init.c') diff --git a/Src/init.c b/Src/init.c index f3576aadd..9fc4a81fb 100644 --- a/Src/init.c +++ b/Src/init.c @@ -757,25 +757,43 @@ run_init_scripts(void) source(GLOBAL_ZSHENV); #endif if (isset(RCS)) { + int globalfirst = isset(GLOBALRCSFIRST); + if (globalfirst) { +#ifdef GLOBAL_ZPROFILE + if (islogin) + source(GLOBAL_ZPROFILE); +#endif +#ifdef GLOBAL_ZSHRC + if (interact) + source(GLOBAL_ZSHRC); +#endif +#ifdef GLOBAL_ZLOGIN + if (islogin) + source(GLOBAL_ZLOGIN); +#endif + } if (unset(PRIVILEGED)) sourcehome(".zshenv"); if (islogin) { #ifdef GLOBAL_ZPROFILE - source(GLOBAL_ZPROFILE); + if (!globalfirst) + source(GLOBAL_ZPROFILE); #endif if (unset(PRIVILEGED)) sourcehome(".zprofile"); } if (interact) { #ifdef GLOBAL_ZSHRC - source(GLOBAL_ZSHRC); + if (!globalfirst) + source(GLOBAL_ZSHRC); #endif if (unset(PRIVILEGED)) sourcehome(".zshrc"); } if (islogin) { #ifdef GLOBAL_ZLOGIN - source(GLOBAL_ZLOGIN); + if (!globalfirst) + source(GLOBAL_ZLOGIN); #endif if (unset(PRIVILEGED)) sourcehome(".zlogin"); -- cgit 1.4.1