]> git.draconx.ca Git - zshconf.git/blob - zprofile
2a4978d9bc591a49cfc67bb8430263d517e0b516
[zshconf.git] / zprofile
1 # /etc/zsh/zprofile
2 # $Header: /var/cvsroot/gentoo-x86/app-shells/zsh/files/zprofile,v 1.5 2008/05/23 12:02:51 tove Exp $
3
4 # Load environment settings from profile.env, which is created by
5 # env-update from the files in /etc/env.d
6 if [ -e /etc/profile.env ] ; then
7         . /etc/profile.env
8 fi
9
10 # You should override these in your ~/.zprofile (or equivalent) for per-user
11 # settings.  For system defaults, you can add a new file in /etc/profile.d/.
12 export EDITOR=${EDITOR:-/usr/bin/vim}
13 export PAGER=${PAGER:-/usr/bin/less}
14
15 # 077 would be more secure, but 022 is generally quite realistic
16 umask 022
17
18 # Set up PATH depending on whether we're root or a normal user.
19 # There's no real reason to exclude sbin paths from the normal user,
20 # but it can make tab-completion easier when they aren't in the
21 # user's PATH to pollute the executable namespace.
22 #
23 # It is intentional in the following line to use || instead of -o.
24 # This way the evaluation can be short-circuited and calling whoami is
25 # avoided.
26 if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then
27         PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}"
28 else
29         PATH="/usr/local/bin:/usr/bin:/bin:${PATH}"
30 fi
31 export PATH="$HOME/bin:$PATH"
32 unset ROOTPATH
33
34 shopts=$-
35 setopt nullglob
36 for sh in /etc/profile.d/*.sh ; do
37         [ -r "$sh" ] && . "$sh"
38 done
39 unsetopt nullglob
40 set -$shopts
41 unset sh shopts
42
43 # Setup colours
44 eval `dircolors --sh /etc/DIR_COLORS`
45 if [[ -n "$LS_COLORS" && -z "$COLORTERM" ]]; then
46         export COLORTERM="ansi"
47 fi