Skip to content

Commit

Permalink
feat(zsh): export NVM dir path, fix spaceship sourcing path
Browse files Browse the repository at this point in the history
  • Loading branch information
AhmedAbdulrahman committed Sep 13, 2023
1 parent c6c548c commit eaf9b90
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
11 changes: 6 additions & 5 deletions zsh/.zshenv
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
# `zprof` on .zshrc
# zmodload zsh/zprof

ZSH_DISABLE_COMPFIX=true

# set -o noclobber

# True color
Expand All @@ -26,7 +28,8 @@ export RUSTUP_HOME="${XDG_DATA_HOME}/rustup"
export CARGO_HOME="${XDG_DATA_HOME}/cargo"
# export ZSH=$HOME/.oh-my-zsh

export NVM_DIR="${HOME}/.nvm"
export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm

# ---------------------------------------------
# Homebrew
Expand Down Expand Up @@ -116,10 +119,8 @@ if [[ -f ${HOME}/.zshenv.local ]]; then
source ${HOME}.zshenv.local
fi

if [[ -f /opt/homebrew/opt/spaceship/Cellar/spaceship.zsh ]]; then
source /opt/homebrew/Cellar/spaceship.zsh
fi

if [[ -d $CARGO_HOME ]]; then
source $CARGO_HOME/env
fi

source $HOMEBREW_PREFIX/opt/spaceship/spaceship.zsh
6 changes: 1 addition & 5 deletions zsh/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,4 @@ else
[[ ${_has_unset_config:-no} == "yes" ]] && echo "Set the missing configs in ~/.zshrc"
fi

[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

[ -d /opt/homebrew/Cellar/spaceship ] && source /opt/homebrew/Cellar/spaceship/4.14.0/spaceship.zsh

[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

0 comments on commit eaf9b90

Please sign in to comment.