57 lines
1.4 KiB
Bash
57 lines
1.4 KiB
Bash
# .zshrc
|
|
|
|
# Path to your Oh My Zsh installation.
|
|
export ZSH="$HOME/.oh-my-zsh"
|
|
|
|
PROMPT="%B%~%b :: "
|
|
RPROMPT="%n@%m"
|
|
|
|
# Plugins
|
|
plugins=(git zsh-syntax-highlighting zsh-autosuggestions)
|
|
|
|
source $ZSH/oh-my-zsh.sh
|
|
|
|
# Golang and GVM
|
|
[[ -s "$HOME/.gvm/scripts/gvm" ]] && source "$HOME/.gvm/scripts/gvm"
|
|
|
|
# Node and NVM (Lazy Load)
|
|
export NVM_DIR="$HOME/.nvm"
|
|
|
|
nvm_load() {
|
|
echo "💤 Waking up NVM..."
|
|
unset -f nvm node npm npx
|
|
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
|
"$@"
|
|
}
|
|
|
|
nvm() { nvm_load "nvm" "$@"; }
|
|
node() { nvm_load "node" "$@"; }
|
|
npm() { nvm_load "npm" "$@"; }
|
|
npx() { nvm_load "npx" "$@"; }
|
|
|
|
# Rust and Cargo
|
|
[ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env"
|
|
|
|
# Zoxide
|
|
eval "$(zoxide init --cmd cd zsh)"
|
|
|
|
# Source Aliases & Secrets
|
|
[ -f ~/.zsh_aliases ] && source ~/.zsh_aliases
|
|
[ -f ~/.zsh_secrets ] && source ~/.zsh_secrets
|
|
|
|
# Conda (Dynamic Path)
|
|
# __conda_setup="$('$HOME/Programming/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
|
|
# if [ $? -eq 0 ]; then
|
|
# eval "$__conda_setup"
|
|
# else
|
|
# if [ -f "$HOME/Programming/miniconda3/etc/profile.d/conda.sh" ]; then
|
|
# . "$HOME/Programming/miniconda3/etc/profile.d/conda.sh"
|
|
# else
|
|
# export PATH="$HOME/Programming/miniconda3/bin:$PATH"
|
|
# fi
|
|
# fi
|
|
# unset __conda_setup
|
|
|
|
# Add to PATH
|
|
export PATH="$HOME/.local/bin:$PATH"
|
|
export PATH="/usr/local/go/bin:$PATH" |