X-Git-Url: https://arthur.barton.de/gitweb/?a=blobdiff_plain;f=core%2F40_path%2F40_path.zprofile;fp=core%2F40_path%2F40_path.zprofile;h=8f0a9f2a6ea31054539f4fa90db07308be7b0f54;hb=47bed33f12851d16560fbb8ccb517a0e0f67b2b9;hp=4421f80ce0f3779767d2145067474ac670c4e690;hpb=c155248c486599825c3b051d44f069922d0cb89a;p=ax-zsh.git diff --git a/core/40_path/40_path.zprofile b/core/40_path/40_path.zprofile index 4421f80..8f0a9f2 100644 --- a/core/40_path/40_path.zprofile +++ b/core/40_path/40_path.zprofile @@ -2,28 +2,41 @@ # 40_path.zprofile: Setup PATH environment # Set default PATH -export PATH="/usr/bin:/bin:/usr/sbin:/sbin" +if [[ -x /usr/libexec/path_helper ]]; then + eval "$(/usr/libexec/path_helper)" +else + PATH="/usr/bin:/bin:/usr/sbin:/sbin" +fi +typeset -Ux PATH # Prepend additional search paths -for d (/usr/local/bin /usr/local/sbin ~/Applications(N)); do +for d ( + /Developer/usr/bin + /usr/ucb + /usr/pkg/bin + /usr/local/bin + /usr/local/sbin + /opt/*/sbin(N) + /opt/*/bin(N) + ~/Applications(N) +); do [ -d "$d" ] && path=("$d" $path) done # Append additional search paths -for d (/opt/*/sbin /opt/*/bin(N)); do +for d ( + /usr/X11/bin + /usr/games +); do [ -d "$d" ] && path=($path "$d") done # Set default MANPATH -export MANPATH="$(manpath -q)" 2>/dev/null +MANPATH="$(manpath -q)" 2>/dev/null if [[ $? -ne 0 ]]; then MANPATH="/usr/share/man" for d (/usr/local/share/man /opt/*/man(N)); do [ -d "$d" ] && manpath=($manpath "$d") done fi - -if [[ -x /usr/libexec/path_helper ]]; then - # Update PATH using "path_helper(1)", when available - eval "$(/usr/libexec/path_helper)" -fi +typeset -Ux MANPATH