mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-23 01:17:59 +00:00
Print an error when a plugin is not found.
This commit is contained in:
parent
30f8aef2a1
commit
5bb9a3e4b5
5
init.zsh
5
init.zsh
@ -48,6 +48,11 @@ autoload -Uz zmv
|
|||||||
# Source plugins defined in ~/.zshrc.
|
# Source plugins defined in ~/.zshrc.
|
||||||
for plugin in "$plugins[@]"; do
|
for plugin in "$plugins[@]"; do
|
||||||
zstyle ":omz:plugin:$plugin" enable 'yes'
|
zstyle ":omz:plugin:$plugin" enable 'yes'
|
||||||
|
|
||||||
|
if [[ ! -d "${0:h}/plugins/$plugin" ]]; then
|
||||||
|
print "omz: no such plugin: $plugin" >&2
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -f "${0:h}/plugins/$plugin/init.zsh" ]]; then
|
if [[ -f "${0:h}/plugins/$plugin/init.zsh" ]]; then
|
||||||
source "${0:h}/plugins/$plugin/init.zsh"
|
source "${0:h}/plugins/$plugin/init.zsh"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user