mirror of
https://github.com/nix-community/home-manager
synced 2024-11-27 13:39:46 +01:00
zsh: only source plugin file if it exists
This allows adding plugins to fpath without sourcing anything
This commit is contained in:
parent
f314ee3d6a
commit
d294aa4356
1 changed files with 3 additions and 1 deletions
|
@ -320,7 +320,9 @@ in
|
||||||
''}
|
''}
|
||||||
|
|
||||||
${concatStrings (map (plugin: ''
|
${concatStrings (map (plugin: ''
|
||||||
|
if [ -f "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}" ]; then
|
||||||
source "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}"
|
source "$HOME/${pluginsDir}/${plugin.name}/${plugin.file}"
|
||||||
|
fi
|
||||||
'') cfg.plugins)}
|
'') cfg.plugins)}
|
||||||
|
|
||||||
# History options should be set in .zshrc and after oh-my-zsh sourcing.
|
# History options should be set in .zshrc and after oh-my-zsh sourcing.
|
||||||
|
|
Loading…
Reference in a new issue