-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path05-path.zsh
More file actions
25 lines (20 loc) · 960 Bytes
/
Copy path05-path.zsh
File metadata and controls
25 lines (20 loc) · 960 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# 05-path.zsh — PATH management & search locations
# =============================================================================
# PATH array configuration
# =============================================================================
# Make PATH array unique to avoid duplicates when prepending paths
typeset -gU path
# =============================================================================
# Homebrew integration (macOS)
# =============================================================================
# Add Homebrew to PATH and set up environment
if [[ -x /opt/homebrew/bin/brew ]]; then
# Apple Silicon Macs
eval "$(/opt/homebrew/bin/brew shellenv)"
elif [[ -x /usr/local/bin/brew ]]; then
# Intel Macs
eval "$(/usr/local/bin/brew shellenv)"
fi
# User-local binaries should beat system binaries on both macOS and Linux.
[[ -d "$HOME/bin" ]] && path=("$HOME/bin" $path)
[[ -d "$HOME/.local/bin" ]] && path=("$HOME/.local/bin" $path)