1
0
mirror of https://github.com/zplug/zplug synced 2025-04-30 13:17:57 +02:00

Show cache message only on --verbose

Fixes #301, #306.
This commit is contained in:
Naoki Mizuno 2016-12-12 20:40:11 +09:00
parent 69433fda44
commit 2ac9888326

@ -103,6 +103,8 @@ __zplug::core::cache::commit()
__zplug::core::cache::diff()
{
local key file
local is_verbose
zstyle -s ':zplug:core:load' 'verbose' is_verbose
$ZPLUG_USE_CACHE || return 2
@ -115,7 +117,9 @@ __zplug::core::cache::diff()
case $status in
0)
# same
__zplug::io::print::f "[zplug] Loaded from cache ($ZPLUG_CACHE_DIR)\n"
if (( $_zplug_boolean_true[(I)$is_verbose] )); then
__zplug::io::print::f "[zplug] Loaded from cache ($ZPLUG_CACHE_DIR)\n"
fi
return 0
;;
1)