You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
635 B
Plaintext

#!/usr/bin/env bash
function add-path {
dir="$1"
if [[ $PATH =~ "$dir" ]]; then
return
fi
if [[ -d $dir ]]; then
PATH=$dir:$PATH
fi
}
4 years ago
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
6 years ago
add-path ~/.deno/bin
4 years ago
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/
6 years ago
unset -f add-path
4 years ago
unset -f prefix-path