tb-dotfiles/chezmoi/dot_zshenv

78 lines
1.9 KiB
Text
Raw Normal View History

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'
export PAGER='less -RF'
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
# if we're in vs code's terminal, set the editor to vs code
if [ "${TERM_PROGRAM:-noop}" = "vscode" ]; then
export EDITOR='code'
export TAG_CMD_FMT_STRING="code --goto {{.Filename}}:{{.LineNumber}}:{{.ColumnNumber}}"
fi
export VISUAL="${EDITOR}"
2022-08-22 20:38:28 -04:00
if [ "$(uname)" = "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
2022-08-22 20:38:28 -04:00
fi
2022-04-22 10:06:53 -04:00
if [ -d "${HOME}/bin" ]; then
export PATH="${HOME}/bin:${PATH}"
fi
if [ -d "${HOME}/.local/bin" ]; then
export PATH="${HOME}/.local/bin:$PATH"
fi
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
if command -v go &> /dev/null; then
GOPATH="$(go env GOPATH)"
if [ -d "${GOPATH}" ]; then
export GOPATH
export PATH="${GOPATH}/bin:${PATH}"
else
unset GOPATH
fi
fi
. /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
typeset -U path
# this is a hack to prevent MacOS from being smarter than us for PATH settings
/usr/libexec/path_helper() :