tarjoilija / zgen

A lightweight and simple plugin manager for ZSH
BSD 2-Clause "Simplified" License
1.5k stars 99 forks source link

Fix Prezto module loading order #87

Open brandon-fryslie opened 7 years ago

brandon-fryslie commented 7 years ago

I found a relatively simple and succinct way to fix the module loading order problem.

Note that this will only work if zgen prezto is first in the list of commands, but if people put other modules first they are probably asking for trouble anyway.

Another issue is that I don't particularly like matching on the specific string 'prezto-master/init.zsh', but that seems unlikely to change, and if it does its a simple fix to change it to the correct name.

This does fix the module loading order problem by making sure all prezto modules are loaded before any other plugins that may depend on them, without overwriting functions and aliases set in other plugins.

santiycr commented 6 years ago

Thanks for the fix. This fixed issues where prezto default modules were overwriting my other plugins!