aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2018-03-08 23:16:01 +0100
committerDavid Runge <dave@sleepmap.de>2018-03-08 23:16:01 +0100
commit747ba2a7897843e8fc5694cfb5f6f0559637094c (patch)
treeffaf7fdd48dec5fb35f3fabc7218999fa156bf99
parent43c1999d23569e767298dfe69d2d0ca8615b2bf1 (diff)
downloaddotfiles-747ba2a7897843e8fc5694cfb5f6f0559637094c.tar.gz
dotfiles-747ba2a7897843e8fc5694cfb5f6f0559637094c.tar.bz2
dotfiles-747ba2a7897843e8fc5694cfb5f6f0559637094c.tar.xz
dotfiles-747ba2a7897843e8fc5694cfb5f6f0559637094c.zip
.zsh.before/path.zsh: Simplifying adding of ~/bin and /usr/sbin to PATH.
-rw-r--r--.zsh.before/path.zsh15
1 files 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