X-Git-Url: https://git.draconx.ca/gitweb/zshconf.git/blobdiff_plain/088cc7568de3e522231b36fd4dd03decce14f936..584264538bca6cfed2212892a359f5b4bfe9d2e2:/zprofile diff --git a/zprofile b/zprofile index 2a4978d..dba3a21 100644 --- a/zprofile +++ b/zprofile @@ -15,21 +15,8 @@ export PAGER=${PAGER:-/usr/bin/less} # 077 would be more secure, but 022 is generally quite realistic umask 022 -# Set up PATH depending on whether we're root or a normal user. -# 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}" -fi -export PATH="$HOME/bin:$PATH" -unset ROOTPATH +# Setup the default path. +path_front /{bin,sbin} /usr/{bin,sbin} /usr/local/{bin,sbin} $HOME/bin shopts=$- setopt nullglob