From 747ba2a7897843e8fc5694cfb5f6f0559637094c Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 8 Mar 2018 23:16:01 +0100 Subject: .zsh.before/path.zsh: Simplifying adding of ~/bin and /usr/sbin to PATH. --- .zsh.before/path.zsh | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.zsh.before/path.zsh b/.zsh.before/path.zsh index 9a99817..71a75de 100644 --- a/.zsh.before/path.zsh +++ b/.zsh.before/path.zsh @@ -1,16 +1,5 @@ -# Add $HOME/bin before /usr/local/sbin and /usr/local/bin in $PATH -# Also works if they are switched -autoload -U regexp-replace -if [[ "$PATH" != *dave/bin:/usr/local/sbin* ]];then - case "$PATH" in - */usr/local/bin:/usr/local/sbin*) - regexp-replace PATH '/usr/local/bin:/usr/local/sbin:' '$HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:' - ;; - */usr/local/sbin:/usr/local/bin*) - regexp-replace PATH '/usr/local/sbin:/usr/local/bin:' '$HOME/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:' - ;; - esac -fi +# Prepend $HOME/bin and append /usr/sbin to PATH (for Debilian) +PATH="$HOME/bin:$PATH:/usr/sbin" ## RASPBERRY PI if [[ "$HOST" == *pitheunlord* ]]; then -- cgit v1.2.3-70-g09d2