denysdovhan / dotfiles

My lovely dots ~/.💖
403 stars 61 forks source link

Custom settings into ~/.zshlocal. doesn't work (pluguins) #33

Closed hugobrilhante closed 1 year ago

hugobrilhante commented 1 year ago

Sorry for the bad example that made you close the issue #27 . I'll try to explain better. The following example works when it's in .zshrc but when I add it the same example in .zshlocal doesn't work.

# Plugins
plugins=(
   history-substring-search
   git
   npm
   yarn
   nvm
   sudo
   extract
   ssh-agent
   gpg-agent
   macos
   gh
   vscode
   common-aliases
   command-not-found
   docker
   docker-compose
)

Other settings such as adding commands to the PATH, as in the example below, work.

# Pyenv settings
 export PYENV_ROOT="$HOME/.pyenv"
 command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
 eval "$(pyenv init -)"
denysdovhan commented 1 year ago

This is probably due to the order of sourced files. I guess OMZ plugins should be defined before OMZ is sourced, not after.