X-Git-Url: http://git.vanrenterghem.biz/Dotty.git/blobdiff_plain/4779acb056bafd13c5a99ab9b94d753fe98b5bc8..0ef958766a7e652d35981030d9a7c991ee71c9fd:/bash/.bashrc diff --git a/bash/.bashrc b/bash/.bashrc index 12b5184..f185983 100644 --- a/bash/.bashrc +++ b/bash/.bashrc @@ -31,4 +31,16 @@ export PYENV_ROOT="$HOME/.pyenv" [[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" eval "$(pyenv init -)" -export PATH="$PATH:$HOME/scripts" +# Append "$1" to $PATH when not already in. +append_path () { + case ":$PATH:" in + *:"$1":*) + ;; + *) + PATH="${PATH:+$PATH:}$1" + esac +} + +# Append our default paths +append_path '/home/frederik/scripts' +