2022-04-22 10:06:53 -04:00
|
|
|
export PATH="/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:${PATH}"
|
|
|
|
export LANG='en_US.UTF-8'
|
2022-04-27 23:17:40 -04:00
|
|
|
export PAGER='less -RF'
|
2022-04-22 10:06:53 -04:00
|
|
|
|
2024-06-03 10:06:14 -04:00
|
|
|
if [[ "$OSTYPE" =~ ^darwin ]]; then
|
|
|
|
if [ -x /opt/homebrew/bin/brew ]; then
|
|
|
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Use GNU tools if they're installed :D
|
|
|
|
for d in "${HOMEBREW_PREFIX}/opt"/*/libexec/gnubin; do
|
|
|
|
export PATH="$d:$PATH"
|
|
|
|
done
|
|
|
|
|
|
|
|
for TEST_PATH in /Applications/Tailscale{.localized,}/Tailscale.app/Contents/MacOS/Tailscale; do
|
|
|
|
if [ -x "$TEST_PATH" ]; then
|
|
|
|
alias tailscale="$TEST_PATH"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2024-05-06 14:26:36 -04:00
|
|
|
if [ -r ~/.asdf/asdf.sh ]; then
|
|
|
|
ASDF_FORCE_PREPEND=1 . ~/.asdf/asdf.sh
|
|
|
|
fi
|
|
|
|
|
|
|
|
if command -v brew &> /dev/null && [ -r "$(brew --prefix)/opt/asdf/libexec/asdf.sh" ]; then
|
|
|
|
. "$(brew --prefix)/opt/asdf/libexec/asdf.sh"
|
|
|
|
fi
|
|
|
|
|
2022-04-22 10:06:53 -04:00
|
|
|
for editor in nvim vim nano; do
|
|
|
|
if command -v "$editor" &> /dev/null; then
|
|
|
|
export EDITOR="$editor"
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2023-06-16 13:29:48 -04:00
|
|
|
if command -v rg &> /dev/null; then
|
|
|
|
export RIPGREP_CONFIG_PATH="${HOME}/.config/ripgrep/ripgreprc"
|
|
|
|
fi
|
|
|
|
|
2022-04-22 10:06:53 -04:00
|
|
|
# if we're in vs code's terminal, set the editor to vs code
|
|
|
|
if [ "${TERM_PROGRAM:-noop}" = "vscode" ]; then
|
2023-05-23 20:44:11 -04:00
|
|
|
if [[ "$TERM_PROGRAM_VERSION" =~ -insider$ ]] && command -v code-insiders &> /dev/null; then
|
|
|
|
export EDITOR='code-insiders'
|
|
|
|
alias code=code-insiders
|
|
|
|
else
|
|
|
|
export EDITOR='code'
|
|
|
|
fi
|
|
|
|
|
|
|
|
export TAG_CMD_FMT_STRING="${EDITOR} --goto {{.Filename}}:{{.LineNumber}}:{{.ColumnNumber}}"
|
2022-04-22 10:06:53 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
export VISUAL="${EDITOR}"
|
|
|
|
|
|
|
|
if [ -d "${HOME}/bin" ]; then
|
|
|
|
export PATH="${HOME}/bin:${PATH}"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d "${HOME}/.local/bin" ]; then
|
|
|
|
export PATH="${HOME}/.local/bin:$PATH"
|
|
|
|
fi
|
|
|
|
|
2022-08-22 21:37:55 -04:00
|
|
|
if [ -d "${HOME}/.poetry/bin" ]; then
|
|
|
|
export PATH="${HOME}/.poetry/bin:$PATH"
|
|
|
|
fi
|
|
|
|
|
2022-04-22 10:06:53 -04:00
|
|
|
. "$HOME/.cargo/env" 2>/dev/null
|
|
|
|
|
2022-12-09 01:19:47 -05:00
|
|
|
if command -v pnpm &> /dev/null; then
|
|
|
|
if [[ "$OSTYPE" =~ ^darwin ]]; then
|
|
|
|
export PNPM_HOME="${HOME}/Library/pnpm"
|
|
|
|
export PATH="$PNPM_HOME:$PATH"
|
2023-02-13 21:26:19 -05:00
|
|
|
mkdir -p "$PNPM_HOME"
|
2022-12-09 01:19:47 -05:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2022-04-22 10:06:53 -04:00
|
|
|
if command -v go &> /dev/null; then
|
|
|
|
GOPATH="$(go env GOPATH)"
|
|
|
|
if [ -d "${GOPATH}" ]; then
|
|
|
|
export GOPATH
|
|
|
|
export PATH="${GOPATH}/bin:${PATH}"
|
2023-08-17 10:35:48 -04:00
|
|
|
else
|
|
|
|
unset GOPATH
|
2022-04-22 10:06:53 -04:00
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
2023-08-17 10:35:48 -04:00
|
|
|
if command -v lazygit &> /dev/null; then
|
|
|
|
alias lg=lazygit
|
|
|
|
fi
|
|
|
|
|
2022-04-22 10:06:53 -04:00
|
|
|
. /etc/profile.d/flatpak.sh 2>/dev/null
|
|
|
|
|
|
|
|
# if rootless docker has a unix domain socket, use it!
|
|
|
|
if [ -e "${XDG_RUNTIME_DIR}/docker.sock" ]; then
|
|
|
|
export DOCKER_HOST="unix://${XDG_RUNTIME_DIR}/docker.sock"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if command -v fzf &> /dev/null && command -v ag &> /dev/null; then
|
|
|
|
export FZF_DEFAULT_COMMAND='ag --skip-vcs-ignores --nocolor -g "" -l'
|
|
|
|
export FZF_CTRL_T_COMMAND="${FZF_DEFAULT_COMMAND}"
|
|
|
|
fi
|
2022-04-26 10:44:37 -04:00
|
|
|
|
|
|
|
typeset -U path
|
2022-08-22 23:15:29 -04:00
|
|
|
|
|
|
|
# this is a hack to prevent MacOS from being smarter than us for PATH settings
|
|
|
|
/usr/libexec/path_helper() :
|