simplified zprofile
This commit is contained in:
parent
29cc9870bf
commit
99c168781b
1 changed files with 2 additions and 22 deletions
|
@ -1,35 +1,15 @@
|
||||||
# /etc/zsh/zprofile
|
|
||||||
# $Id$
|
|
||||||
|
|
||||||
# Load environment settings from profile.env, which is created by
|
# Load environment settings from profile.env, which is created by
|
||||||
# env-update from the files in /etc/env.d
|
# a platform tool (e.g. eclectic env update, env-update) from the files in /etc/env.d
|
||||||
if [ -e /etc/profile.env ] ; then
|
if [ -e /etc/profile.env ] ; then
|
||||||
. /etc/profile.env
|
. /etc/profile.env
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# You should override these in your ~/.zprofile (or equivalent) for per-user
|
|
||||||
# settings. For system defaults, you can add a new file in /etc/profile.d/.
|
|
||||||
export EDITOR=${EDITOR:-/bin/nano}
|
export EDITOR=${EDITOR:-/bin/nano}
|
||||||
export PAGER=${PAGER:-/usr/bin/less}
|
export PAGER=${PAGER:-/usr/bin/less}
|
||||||
|
|
||||||
# 077 would be more secure, but 022 is generally quite realistic
|
|
||||||
umask 022
|
umask 022
|
||||||
|
|
||||||
# Set up PATH depending on whether we're root or a normal user.
|
export PATH="/home/${USER}/Apps/bin:/usr/local/bin:/usr/bin:/bin:${PATH}"
|
||||||
# There's no real reason to exclude sbin paths from the normal user,
|
|
||||||
# but it can make tab-completion easier when they aren't in the
|
|
||||||
# user's PATH to pollute the executable namespace.
|
|
||||||
#
|
|
||||||
# It is intentional in the following line to use || instead of -o.
|
|
||||||
# This way the evaluation can be short-circuited and calling whoami is
|
|
||||||
# avoided.
|
|
||||||
if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then
|
|
||||||
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}"
|
|
||||||
else
|
|
||||||
PATH="/usr/local/bin:/usr/bin:/bin:${PATH}:/home/${USER}/Apps/bin"
|
|
||||||
fi
|
|
||||||
export PATH
|
|
||||||
unset ROOTPATH
|
|
||||||
|
|
||||||
shopts=$-
|
shopts=$-
|
||||||
setopt nullglob
|
setopt nullglob
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue