From 57ff1ad019b13e8e5d7b45ab56bad5cd9711a163 Mon Sep 17 00:00:00 2001 From: Rosty Hnatyshyn Date: Mon, 10 Aug 2026 19:36:49 -0700 Subject: [PATCH] cleanup zshrc --- zshrc | 33 ++++++++++++++++++--------------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/zshrc b/zshrc index 8cfdf93..438b68a 100644 --- a/zshrc +++ b/zshrc @@ -10,13 +10,13 @@ CASE_SENSITIVE="true" zstyle ':omz:update' mode auto # update automatically without asking zstyle ':omz:update' frequency 7 -plugins=(zsh-autosuggestions sudo web-search copypath gitignore) +plugins=(zsh-autosuggestions sudo web-search copypath gitignore zoxide) source $ZSH/oh-my-zsh.sh alias vim='nvim' +alias vi='nvim' alias ws='web_search' -alias ncspot='~/.config/ncspot/playerctl_notifier.sh & ncspot' zstyle ':completion:*' completer _complete _approximate zstyle ':completion:*' group-name '' @@ -35,22 +35,25 @@ SAVEHIST=1000 bindkey -v # bind keys to vim mode eval "$(zoxide init zsh)" -export GEM_HOME="$(ruby -e 'puts Gem.user_dir')" -path+=("$GEM_HOME/bin") -# Restart your shell for the changes to take effect. +# set up ruby if installed +if (($+commands[ruby] )); then + export GEM_HOME="$(ruby -e 'puts Gem.user_dir')" + path+=("$GEM_HOME/bin") +fi + +# set up pyenv if installed export PYENV_ROOT="$HOME/.pyenv" -[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH" -eval "$(pyenv init -)" +if (($+commands[pyenv] )); then + export PATH="$PYENV_ROOT/bin:$PATH" + eval "$(pyenv init -)" +fi + +path+=("$HOME/.local/bin/") export PATH -[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh +[[ ! -f "$HOME/.p10k.zsh" ]] || source "$HOME/.p10k.zsh" # put your paths and aliases here to avoid merge conflicts -[[ ! -f ~/.myzsh ]] || source ~/.myzsh -[[ -f ~/.profile ]] && . ~/.profile - -## [Completion] -## Completion scripts setup. Remove the following line to uninstall -[[ -f /home/frosty/.dart-cli-completion/zsh-config.zsh ]] && . /home/frosty/.dart-cli-completion/zsh-config.zsh || true -## [/Completion] +[[ ! -f "$HOME/.myzsh" ]] || source "$HOME/.myzsh" +[[ -f "$HOME/.profile" ]] && . "$HOME/.profile"