dotfiles/zsh/.zpath

24 lines
612 B
Plaintext
Raw Normal View History

2023-09-15 22:59:26 +02:00
#!/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
2024-02-01 18:34:16 +01:00
[ -d "${HOME}/go/bin" ] && path+=("${HOME}/go/bin")
2023-09-15 22:59:26 +02:00
# 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")
export PATH
# Automatically remove duplicates from these arrays
typeset -gU path cdpath manpath fpath