#!/usr/bin/env bash function add-path { dir="$1" if [[ $PATH =~ "$dir" ]]; then return fi if [[ -d $dir ]]; then PATH=$dir:$PATH fi } function prefix-path { dir="$1" if [[ $PATH =~ "$dir" ]]; then return fi if [[ -d $dir ]]; then PATH=$PATH:$dir fi } add-path /usr/local/go/bin add-path ~/.bin add-path ~/.cargo/bin add-path ~/.deno/bin prefix-path ~/.local/bin add-path ~/bin add-path ~/go/bin add-path ~/opt/bin # work add-path ~/.rbenv/shims add-path /usr/local/opt/mysql-client/bin add-path ~/google-cloud-sdk/bin/ unset -f add-path unset -f prefix-path