From 0cb9f782ddcb2c54993f1e3df511fb32289bcd64 Mon Sep 17 00:00:00 2001 From: "Simen A. W. Olsen" Date: Sat, 27 Jul 2024 17:22:37 +0200 Subject: chore: rename zsh files --- .path.zsh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .path.zsh (limited to '.path.zsh') diff --git a/.path.zsh b/.path.zsh new file mode 100644 index 0000000..febb59e --- /dev/null +++ b/.path.zsh @@ -0,0 +1,12 @@ +#!/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" + -- cgit v1.2.3