2024-07-03 07:25:50 +00:00
|
|
|
# ---- Version Managers ----
|
|
|
|
export NVM_DIR="$HOME/.nvm"
|
|
|
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
|
|
|
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
|
|
|
|
|
|
|
export PYENV_ROOT="$HOME/.pyenv"
|
|
|
|
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
|
|
|
|
eval "$(pyenv init -)"
|
|
|
|
eval "$(pyenv virtualenv-init -)"
|
|
|
|
|
|
|
|
# ---- Native Command Overwrites ----
|
2024-07-03 22:22:42 +00:00
|
|
|
/usr/bin/which -s nvim && alias vi="nvim" && alias vim="nvim" || echo "nvim not found, falling back to vi"
|
|
|
|
/usr/bin/which -s bat && alias cat="bat" || echo "bat not found, falling back to cat"
|
|
|
|
/usr/bin/which -s fd && alias find="fd -H" || echo "fd not found, falling back to find"
|
|
|
|
/usr/bin/which -s zoxide && alias cd="z" || echo "zoxide not found, falling back to cd"
|
|
|
|
/usr/bin/which -s eza && alias ls="eza --color=always --git --no-filesize --icons=always --no-time --no-user --no-permissions" || echo "eza not found, falling back to ls"
|
2024-07-03 07:25:50 +00:00
|
|
|
|
2024-07-18 23:49:21 +00:00
|
|
|
# ---- SSH Agent (1Password) ----
|
2024-07-19 00:07:46 +00:00
|
|
|
# https://developer.1password.com/docs/ssh/get-started/#step-3-turn-on-the-1password-ssh-agent
|
2024-07-18 23:49:21 +00:00
|
|
|
export SSH_AUTH_SOCK=~/Library/Group\ Containers/2BUA8C4S2C.com.1password/t/agent.sock
|
|
|
|
|
2024-07-03 07:25:50 +00:00
|
|
|
# ---- SSH Shortcuts ----
|
|
|
|
alias pandora="ssh root@pandora.cortex.io"
|
|
|
|
alias miranda="ssh root@miranda.cortex.io"
|
|
|
|
|
|
|
|
# ---- convenience commands ----
|
2024-09-17 21:27:19 +00:00
|
|
|
alias editShell="vi ~/.zshrc"
|
2024-07-03 07:25:50 +00:00
|
|
|
alias sourceShell="source ~/.zshrc"
|
|
|
|
|
|
|
|
export NOMAD_ADDR=http://pandora.cortex.io:4646
|
|
|
|
export PATH="/opt/homebrew/opt/libpq/bin:$PATH"
|
|
|
|
|
|
|
|
# ---- Oh-My-Posh ----
|
2024-09-17 23:13:36 +00:00
|
|
|
if [ "$TERM_PROGRAM" != "Apple_Terminal" ] && [ "$TERM_PROGRAM" != "zed" ];
|
|
|
|
then
|
|
|
|
eval "$(oh-my-posh init zsh --config ~/.config/oh-my-posh/theme.toml)"
|
2024-07-03 07:25:50 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
# ---- Zoxide (better cd) ----
|
|
|
|
eval "$(zoxide init zsh)"
|
|
|
|
|
2024-07-03 22:20:17 +00:00
|
|
|
# ---- Homebrew ----
|
|
|
|
eval "$(/opt/homebrew/bin/brew shellenv)"
|
|
|
|
|
2024-09-17 21:25:07 +00:00
|
|
|
# ---- ZSH Plugins ----
|
|
|
|
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
|
|
|
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
|
|
|
|
2024-07-03 07:25:50 +00:00
|
|
|
# ---- Auto Enter TMUX ----
|
2024-09-17 23:13:36 +00:00
|
|
|
if [ -z "$TMUX" ] && [ "$TERM_PROGRAM" != "vscode" ] && [ "$TERM_PROGRAM" != "zed" ];
|
2024-07-03 07:25:50 +00:00
|
|
|
then
|
|
|
|
tmux attach -t TMUX || tmux new -s TMUX
|
|
|
|
fi
|
2024-09-17 23:13:36 +00:00
|
|
|
|