From f311c01a1b2672ab2c724674de8022e83988545e Mon Sep 17 00:00:00 2001 From: "Simen A. W. Olsen" Date: Fri, 27 Dec 2024 14:37:58 +0100 Subject: reorganize --- zsh/path.zsh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 zsh/path.zsh (limited to 'zsh/path.zsh') 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" + -- cgit v1.2.3