diff options
-rw-r--r-- | .zsh.before/path.zsh | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/.zsh.before/path.zsh b/.zsh.before/path.zsh index 146943d..f19b704 100644 --- a/.zsh.before/path.zsh +++ b/.zsh.before/path.zsh @@ -1,13 +1,11 @@ -# prepend pyenv based python, in case there's any -if [ -d "$HOME/.local/bin" ] && [ -d "$HOME/.pyenv/shims" ]; then - PATH="$HOME/.local/bin:$HOME/.pyenv/shims:$PATH" -fi - -## RASPBERRY PI -if [[ "$HOST" == *pitheunlord* ]]; then - PATH=$PATH:"/opt/vc/bin:/opt/vc/sbin" -fi - -# Prepend $HOME/bin and append /usr/sbin to PATH (for Debilian) -PATH="$HOME/bin:$PATH:/usr/sbin" +# pyenv +[ -d "${HOME}/.local/bin" ] && PATH="${HOME}/.local/bin:${PATH}" +[ -d "${HOME}/.pyenv/shims" ] && PATH="${HOME}/.pyenv/shims:${PATH}" +# RPi +[ -d "/opt/vc/bin" ] && PATH="${PATH}:/opt/vc/bin" +[ -d "/opt/vc/sbin" ] && PATH="${PATH}:/opt/vc/sbin" +# user bin +[ -d "${HOME}/bin" ] && PATH="${HOME}/bin:${PATH}" +# Debilian +[ -d "/usr/sbin" ] && [ ! -L "/usr/sbin" ] && PATH="${PATH}:/usr/sbin" |