From: martin f. krafft Date: Fri, 9 May 2008 19:43:01 +0000 (+0100) Subject: set paths in zshenv! X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=031352278be1cb6c716d65d73cb2dd373628c34d;p=zsh.git set paths in zshenv! --- diff --git a/.zsh/zprofile/00_fpath b/.zsh/zprofile/00_fpath deleted file mode 100644 index 37bd6e5..0000000 --- a/.zsh/zprofile/00_fpath +++ /dev/null @@ -1,13 +0,0 @@ -# zshenv/00_fpath -# -# Adds local functions directory to $fpath -# -# 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 -# - -fpath=($ZDOTDIR/func $fpath) - -# vim:ft=zsh diff --git a/.zsh/zprofile/00_path b/.zsh/zprofile/00_path deleted file mode 100644 index 230e94f..0000000 --- a/.zsh/zprofile/00_path +++ /dev/null @@ -1,34 +0,0 @@ -# zprofile/00_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 -# - -__prepend_dir_to_path() -{ - for dir; do - case "$PATH" in - "*:${dir}:*"|"${dir}:*"|"*:${dir}") :;; - *) test -d "$dir" && path=("$dir" $path);; - esac - done -} - -__append_dir_to_path() -{ - for dir; do - case "$PATH" in - "*:${dir}:*"|"${dir}:*"|"*:${dir}") :;; - *) test -d "$dir" && path+="$dir";; - esac - done -} - -__prepend_dir_to_path $BINDIR -__append_dir_to_path /usr/lib/surfraw - -# vim:ft=zsh diff --git a/.zsh/zshenv/00_fpath b/.zsh/zshenv/00_fpath new file mode 100644 index 0000000..37bd6e5 --- /dev/null +++ b/.zsh/zshenv/00_fpath @@ -0,0 +1,13 @@ +# zshenv/00_fpath +# +# Adds local functions directory to $fpath +# +# 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 +# + +fpath=($ZDOTDIR/func $fpath) + +# vim:ft=zsh diff --git a/.zsh/zshenv/00_path b/.zsh/zshenv/00_path new file mode 100644 index 0000000..230e94f --- /dev/null +++ b/.zsh/zshenv/00_path @@ -0,0 +1,34 @@ +# zprofile/00_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 +# + +__prepend_dir_to_path() +{ + for dir; do + case "$PATH" in + "*:${dir}:*"|"${dir}:*"|"*:${dir}") :;; + *) test -d "$dir" && path=("$dir" $path);; + esac + done +} + +__append_dir_to_path() +{ + for dir; do + case "$PATH" in + "*:${dir}:*"|"${dir}:*"|"*:${dir}") :;; + *) test -d "$dir" && path+="$dir";; + esac + done +} + +__prepend_dir_to_path $BINDIR +__append_dir_to_path /usr/lib/surfraw + +# vim:ft=zsh