Skip to content

Fix assignment of variable ZSH#114

Open
laggardkernel wants to merge 2 commits intotarjoilija:masterfrom
laggardkernel:var-zsh
Open

Fix assignment of variable ZSH#114
laggardkernel wants to merge 2 commits intotarjoilija:masterfrom
laggardkernel:var-zsh

Conversation

@laggardkernel
Copy link
Copy Markdown

Details about this in #111.

In short, prezto doesn't use ZSH variable at all. Only oh-my-zsh needs this variable ZSH. If ZSH directs to path of prezto, error occurs during loading of oh-my-zsh:

/Users/<username>/.zgen/robbyrussell/oh-my-zsh-master/oh-my-zsh.sh:34: no matches found: /Users/<username>/.zgen/sorin-ionescu/prezto-master/lib/*.zsh

And here is where the error above occurred,

# from oh-my-zsh.sh, starts at line 32
# Load all of the config files in ~/oh-my-zsh that end in .zsh
# TIP: Add files you don't want in git to .gitignore
for config_file ($ZSH/lib/*.zsh); do
  custom_config_file="${ZSH_CUSTOM}/lib/${config_file:t}"
  [ -f "${custom_config_file}" ] && config_file=${custom_config_file}
  source $config_file
done

So, ZSH should always directs to path of oh-my-zsh repo.

Besides, in init.zsh generated by zgen, sorin-ionescu/prezto-master/init.zsh should be sourced after robbyrussell/oh-my-zsh-master/oh-my-zsh.sh. Or prompt theme from prezto module named prompt may failed to be loaded. This could be achieved in configuration file, by writing zgen prezto after zgen oh-my-zsh, which tip I added into README.md.

laggardkernel added 2 commits December 4, 2018 14:34
1. Variable ZSH is not needed by prezto at all.
2. Prezto shouldn't take variable ZSH, or oh-my-zsh.sh from oh-my-zsh will
fail to be loaded.
`zgen prezto` should be written after `zgen oh-my-zsh`
jandamm added a commit to jandamm/zgenom that referenced this pull request Sep 19, 2020
* Fix variable ZSH
1. Variable ZSH is not needed by prezto at all.
2. Prezto shouldn't take variable ZSH, or oh-my-zsh.sh from oh-my-zsh will
fail to be loaded.

* Instructions for loading priority
`zgen prezto` should be written after `zgen oh-my-zsh`

Co-authored-by: laggardkernel <laggardkernel@qq.com>

Closes tarjoilija/zgen#114
forivall pushed a commit to forivall/zgen that referenced this pull request Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant