mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08:00
zsh: only source plugin file if it exists
This allows adding plugins to fpath without sourcing anything
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user