1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-24 02:39:48 +01:00

zsh: only source plugin file if it exists

This allows adding plugins to fpath without sourcing anything
This commit is contained in:
Silvan Mosberger 2018-04-16 22:12:53 +02:00
parent f314ee3d6a
commit d294aa4356

View file

@ -320,7 +320,9 @@ in
''}
${concatStrings (map (plugin: ''
source "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}"
if [ -f "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}" ]; then
source "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}"
fi
'') cfg.plugins)}
# History options should be set in .zshrc and after oh-my-zsh sourcing.