From: martin f. krafft Date: Tue, 6 May 2008 10:03:16 +0000 (+0100) Subject: customise $PATH X-Git-Url: https://git.madduck.net/etc/zsh.git/commitdiff_plain/d2ff023f7d000c60f774beccd57cb652977b7279 customise $PATH --- diff --git a/.zsh/zprofile/00_path b/.zsh/zprofile/00_path new file mode 120000 index 0000000..520b124 --- /dev/null +++ b/.zsh/zprofile/00_path @@ -0,0 +1 @@ +../zshrc/00_path \ No newline at end of file diff --git a/.zsh/zshrc/00_path b/.zsh/zshrc/00_path new file mode 100644 index 0000000..e7a18b1 --- /dev/null +++ b/.zsh/zshrc/00_path @@ -0,0 +1,25 @@ +# zprofile/90_path +# +# Adds custom directories to the $PATH +# +# Copyright © 1994–2008 martin f. krafft +# Released under the terms of the Artistic Licence 2.0 +# +# Source repository: http://git.madduck.net/v/etc/zsh.git +# + +for p in $HOME/bin $HOME/.bin; do + case "$PATH" in + "*:${p}:*"|"${p}:*"|"*:${p}") :;; + *) PATH="${p}:$PATH";; + esac +done + +for p in /usr/lib/surfraw; do + case "$PATH" in + "*:${p}:*"|"${p}:*"|"*:${p}") :;; + *) PATH="${PATH}:$p";; + esac +done + +# vim:ft=zsh