Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh handling of non-standard if-evaluations



On Jan 30, 10:30am, Daniel Qarras wrote:
}
} I am testing this under RHEL4 / FC6, both have zsh RPMs that comes with
} /etc/zprofile

Yes, I've been annoyed with RedHat's zsh packaging for years now.  At
least it's gotten slightly better; if you saw what they had back in
RH5 and RH6 you'd be using stronger expletives than "uh, oh."

} For example, admin sets locales in /etc/profile but I want use locale
} settings I set up in my init files in any case. .zshenv would be
} logical, I guess, but it's too early as /etc/profile gets sources
} later.

The thing to do is put

	setopt no_global_rcs

in your ~/.zshenv.  That will disable reading of all the /etc/z* files
except /etc/zshenv.  Then you can put the settings you want wherever
it is you want them, including the "emulate sh" snippet around loading
the /etc/profile.

} .zprofile won't work because it's not sources when starting an
} xterm. And .zshrc is no good because it's not sourced when session is
} not interactive!

But /etc/profile isn't read by non-login shells either, so anything
that works from there should work from ~/.zprofile, once you get
around the problem of having to override something that was set
incorrectly by the /etc/z* files.

On Jan 30,  1:14pm, Daniel Qarras wrote:
} Subject: Re: zsh handling of non-standard if-evaluations
}
} Oh, crap.. It turned out that Red Hat defaults source /etc/profile et
} al both from /etc/zprofile and /etc/zshrc! I'll be complaining to them
} at the above mentioned bug :(

The skel ~/.bashrc sources /etc/bashrc which does the /etc/profile.d
dance as well, so they're just trying to cover all of their bases.



Messages sorted by: Reverse Date, Date, Thread, Author