mirror of
https://codeberg.org/hyperreal/home-manager
synced 2024-11-25 20:33:41 +01:00
27 lines
715 B
Plaintext
27 lines
715 B
Plaintext
|
#!/usr/bin/env zsh
|
||
|
|
||
|
# 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/bin" ] && path+=("${HOME}/go/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")
|
||
|
|
||
|
# Add ~/.npm-global/bin to PATH
|
||
|
[ -d "${HOME}/.npm-global/bin" ] && path+=("${HOME}/.npm-global/bin")
|
||
|
|
||
|
export PATH
|
||
|
|
||
|
# Automatically remove duplicates from these arrays
|
||
|
typeset -gU path cdpath manpath fpath
|