diff --git a/.bashrc b/.bashrc index 0f225d6..44b7801 100644 --- a/.bashrc +++ b/.bashrc @@ -1,8 +1,12 @@ +#-------------------------------------------------------------------------------- +# Function to prepend PATH only if it doesn't already exist +#-------------------------------------------------------------------------------- pathadd() { if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then PATH="$1${PATH:+":$PATH"}" fi } +#-------------------------------------------------------------------------------- #-------------------------------------------------------------------------------- # The best editor