2023-05-18 17:04:51 +02:00
|
|
|
# PATH variable declaration as array
|
|
|
|
# -U means unique, which tells the shell not to add anything to the array if it's
|
|
|
|
# already there.
|
|
|
|
typeset -U PATH path
|
|
|
|
|
|
|
|
# Set Go path if it exists
|
|
|
|
[ -d "${HOME}/go" ] && GOPATH="${HOME}/go" && path+=("${GOPATH}/bin")
|
|
|
|
|
|
|
|
# Set Cargo path for Rust binaries
|
|
|
|
[ -d "${HOME}/.cargo/bin" ] && path+=("${HOME}/.cargo/bin")
|
|
|
|
|
|
|
|
# Add ~/bin to PATH
|
|
|
|
[ -d "${HOME}/bin" ] && path+=("${HOME}/bin")
|
|
|
|
|
|
|
|
# Add ~/.local/bin to PATH
|
|
|
|
[ -d "${HOME}/.local/bin" ] && path+=("${HOME}/.local/bin")
|
|
|
|
|
2023-06-13 16:06:05 +02:00
|
|
|
# Add nixos paths
|
|
|
|
path+=("/run/current-system/sw/bin")
|
|
|
|
path+=("/run/current-system/sw/sbin")
|
|
|
|
path+=("/home/jas/.nix-profile/bin")
|
|
|
|
path+=("/home/jas/.nix-profile/sbin")
|
|
|
|
path+=("/home/jas/.npm-global/bin")
|
|
|
|
|
2023-05-18 17:04:51 +02:00
|
|
|
export PATH
|
|
|
|
|
|
|
|
# Automatically remove duplicates from these arrays
|
|
|
|
typeset -gU path cdpath manpath fpath
|