aboutsummaryrefslogtreecommitdiffstats
path: root/zsh/path.zsh
diff options
context:
space:
mode:
authorSimen A. W. Olsen <hello@simenandre.no>2024-12-27 14:37:58 +0100
committerSimen A. W. Olsen <hello@simenandre.no>2024-12-27 14:38:11 +0100
commitf311c01a1b2672ab2c724674de8022e83988545e (patch)
tree6ba37deb89746ea70ea022c15b124e975e33b953 /zsh/path.zsh
parent54abce564fa2ce215df74066102f68ed8ba0164a (diff)
downloaddotfiles-f311c01a1b2672ab2c724674de8022e83988545e.tar.gz
dotfiles-f311c01a1b2672ab2c724674de8022e83988545e.zip
reorganize
Diffstat (limited to 'zsh/path.zsh')
-rw-r--r--zsh/path.zsh13
1 files changed, 13 insertions, 0 deletions
diff --git a/zsh/path.zsh b/zsh/path.zsh
new file mode 100644
index 0000000..ef41549
--- /dev/null
+++ b/zsh/path.zsh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+# Add directories to the PATH and prevent to add the same directory multiple times upon shell reload.
+add_to_path() {
+ if [[ -d "$1" ]] && [[ ":$PATH:" != *":$1:"* ]]; then
+ export PATH="$1:$PATH"
+ fi
+}
+
+# Add ghq to PATH
+add_to_path "$GOPATH/bin"
+add_to_path "/Library/Frameworks/Firebird.framework/Resources/bin"
+