From a33579a6671ddfdf4d16b0fa16069634913895ce Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Tue, 10 May 2022 11:55:09 +0200 Subject: zshenv: move path_{append,prepend} to utils ...so these can be used in zshrc as well. --- .zsh/zshenv/01_path | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) (limited to '.zsh/zshenv/01_path') diff --git a/.zsh/zshenv/01_path b/.zsh/zshenv/01_path index 4f402dd..035a83d 100644 --- a/.zsh/zshenv/01_path +++ b/.zsh/zshenv/01_path @@ -1,6 +1,6 @@ # zshenv/01_path # -# Functions to add custom directories to the $PATH +# Add custom directories to the $PATH # # Copyright © 2011-2013 Tobias Klauser # Copyright © 1994–2008 martin f. krafft @@ -8,28 +8,6 @@ # # Source repository: git://git.distanz.ch/dotfiles/zsh.git -path_prepend() -{ - local dir - for dir; do - case "$PATH" in - "*:${dir}:*"|"${dir}:*"|"*:${dir}") :;; - *) test -d "$dir" && path=("$dir" $path);; - esac - done -} - -path_append() -{ - local dir - for dir; do - case "$PATH" in - "*:${dir}:*"|"${dir}:*"|"*:${dir}") :;; - *) test -d "$dir" && path+="$dir";; - esac - done -} - # add the paths here path_prepend $HOME/.local/bin -- cgit v1.2.3-54-g00ecf