summaryrefslogtreecommitdiff
path: root/.zsh/zshenv/01_path
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2022-05-10 11:55:09 +0200
committerTobias Klauser <tklauser@distanz.ch>2022-05-10 11:55:09 +0200
commita33579a6671ddfdf4d16b0fa16069634913895ce (patch)
treefdd6d447cdb6f373ebe56c1df49ccc44f6622e90 /.zsh/zshenv/01_path
parentaeef88301d7a173c0fb6629536c4aaf1652adfa9 (diff)
zshenv: move path_{append,prepend} to utils
...so these can be used in zshrc as well.
Diffstat (limited to '.zsh/zshenv/01_path')
-rw-r--r--.zsh/zshenv/01_path24
1 files changed, 1 insertions, 23 deletions
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 <tklauser@distanz.ch>
# Copyright © 1994–2008 martin f. krafft <madduck@madduck.net>
@@ -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