-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc-Darwin
47 lines (39 loc) · 1.45 KB
/
.zshrc-Darwin
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Map gmake to make
if [[ "$OSTYPE" == "darwin"* ]]; then
export PATH="$(brew --prefix)/opt/make/libexec/gnubin:$PATH"
fi
# Map GCC to the version installed by Homebrew on macOS for x86_64
if [[ "$OSTYPE" == "darwin"* && $(uname -m) == 'x86_64' ]]; then
print -v version /usr/local/opt/gcc@<->(n[-1])
version=${version#*@}
for file in /usr/local/opt/gcc@${version}/bin/*-${version}(*); do
tail=${file:t}
ln -sf ${file} /usr/local/bin/${tail%-*}
done
fi
# Map GCC to the version installed by Homebrew on macOS for arm
if [[ "$OSTYPE" == "darwin"* && $(uname -m) == 'arm64' ]]; then
print -v version /opt/homebrew/opt/gcc@<->(n[-1])
version=${version#*@}
for file in /opt/homebrew/opt/gcc@${version}/bin/*-${version}(*); do
tail=${file:t}
ln -sf ${file} /opt/homebrew/bin/${tail%-*}
done
fi
#Ruby on macOS
if [ -d "/usr/local/opt/ruby/bin" ]; then
export PATH=/usr/local/opt/ruby/bin:$PATH
export PATH=`gem environment gemdir`/bin:$PATH
fi
#Ruby on macOS arm64
if [ -d "/opt/homebrew/opt/ruby/bin" ]; then
export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
export PATH="`gem environment gemdir`/bin:$PATH"
fi
export LDFLAGS="-L/opt/homebrew/lib:$LDFLAGS"
export CPPFLAGS="-I/opt/homebrew/include:$CPPFLAGS"
export LIBRARY_PATH="$LIBRARY_PATH:$(brew --prefix)/lib:$LIBRARY_PATH"
# Generated for envman. Added by webi installer for golang
[ -s "$HOME/.config/envman/load.sh" ] && source "$HOME/.config/envman/load.sh"
# zoxide
eval "$(zoxide init zsh)"