2018-06-15 13:43:04 +00:00
|
|
|
#!/usr/bin/env zsh
|
2018-02-23 09:38:24 +00:00
|
|
|
|
2018-11-13 06:05:03 +00:00
|
|
|
# make these variables unique (-U) arrays (-a)
|
2019-05-01 14:40:25 +00:00
|
|
|
typeset -aU fpath manpath path ldflags cppflags
|
2018-10-12 04:34:27 +00:00
|
|
|
|
2018-02-23 09:38:24 +00:00
|
|
|
if is_macos; then
|
2018-11-13 06:05:03 +00:00
|
|
|
path=(
|
2019-01-29 10:45:24 +00:00
|
|
|
~/Library/Python/*/bin
|
2019-02-02 11:12:31 +00:00
|
|
|
/usr/local/opt/ruby/bin
|
2018-11-13 06:05:03 +00:00
|
|
|
/usr/local/opt/file-formula/bin # file
|
|
|
|
/usr/local/opt/gnu-tar/libexec/gnubin # GNU tar
|
|
|
|
/usr/local/opt/unzip/bin # GNU unzip
|
|
|
|
/usr/local/opt/openssl/bin # openssl
|
|
|
|
/usr/local/opt/gnu-getopt/bin # getopt
|
|
|
|
/usr/local/opt/findutils/libexec/gnubin # GNU findutils
|
|
|
|
/usr/local/opt/coreutils/libexec/gnubin # GNU coreutils
|
2019-05-01 14:40:25 +00:00
|
|
|
/usr/local/opt/curl/bin # curl
|
2018-11-13 06:05:03 +00:00
|
|
|
"${path[@]}"
|
|
|
|
)
|
|
|
|
|
|
|
|
manpath=(
|
|
|
|
/usr/local/opt/findutils/libexec/gnuman # GNU findutils
|
|
|
|
"${manpath[@]}"
|
|
|
|
)
|
2019-05-01 14:40:25 +00:00
|
|
|
|
|
|
|
export LDFLAGS="-L/usr/local/opt/ruby/lib"
|
|
|
|
export CPPFLAGS="-I/usr/local/opt/ruby/include"
|
2018-02-23 09:38:24 +00:00
|
|
|
fi
|
|
|
|
|
2018-11-28 19:00:09 +00:00
|
|
|
# add Go binaries
|
|
|
|
export GOPATH="$HOME/.go"
|
|
|
|
path=("$GOPATH/bin" "${path[@]}")
|
|
|
|
|
2018-11-13 06:05:03 +00:00
|
|
|
# add user binaries
|
|
|
|
path=(~/bin ~/.local/bin "${path[@]}")
|
2018-10-11 20:38:05 +00:00
|
|
|
|
2018-11-13 06:05:03 +00:00
|
|
|
# add my completions
|
2019-04-22 15:07:02 +00:00
|
|
|
fpath=("$ZSH_DOTFILES/completions" "${fpath[@]}")
|
2018-11-13 06:05:03 +00:00
|
|
|
|
|
|
|
# check for Rust installed via rustup
|
2018-12-02 10:06:15 +00:00
|
|
|
if rust_sysroot="$(~/.cargo/bin/rustc --print sysroot 2> /dev/null)"; then
|
2019-02-02 11:12:31 +00:00
|
|
|
# add paths of the current Rust toolchain
|
2018-11-13 06:05:03 +00:00
|
|
|
path=(~/.cargo/bin "${path[@]}")
|
|
|
|
fpath=("$rust_sysroot/share/zsh/site-functions" "${fpath[@]}")
|
|
|
|
manpath=("$rust_sysroot/share/man" "${manpath[@]}")
|
2018-10-11 20:38:05 +00:00
|
|
|
fi
|
2018-11-13 06:05:03 +00:00
|
|
|
unset rust_sysroot
|
|
|
|
|
|
|
|
# add colon after MANPATH so that it doesn't overwrite system MANPATH
|
|
|
|
MANPATH="$MANPATH:"
|
2018-09-09 12:15:20 +00:00
|
|
|
|
2018-11-13 06:05:03 +00:00
|
|
|
export PATH MANPATH
|