]> git.draconx.ca Git - zshconf.git/blobdiff - zshenv
Add functions for manipulating PATH, and use them to set the default.
[zshconf.git] / zshenv
diff --git a/zshenv b/zshenv
new file mode 100644 (file)
index 0000000..09b4a03
--- /dev/null
+++ b/zshenv
@@ -0,0 +1,22 @@
+# Common functions used by all startup scripts.
+#
+# Copyright (C) 2009 Nick Bowler
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.  This file is offered as-is,
+# without any warranty.
+
+path_front() {
+       local i
+       for i in $@; do
+               path=($i ${path:#$i})
+       done
+}
+
+path_back() {
+       local i
+       for i in $@; do
+               path=(${path:#$i} $i)
+       done
+}