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

Support to load local zsh-theme files

This commit is contained in:
b4b4r07 2016-11-21 20:07:09 +09:00
parent 859bd6c6d7
commit 81f04ce3e9
2 changed files with 27 additions and 2 deletions

@ -179,5 +179,31 @@ __zplug::sources::local::load_command()
__zplug::sources::local::load_theme()
{
__zplug::sources::local::load_plugin "$argv[@]"
local repo="$1" ext
local -a load_themes
local -a themes_ext
themes_ext=("zsh-theme" "theme-zsh")
if (( $# < 1 )); then
__zplug::io::log::error \
"too few arguments"
return 1
fi
for ext in "$themes_ext[@]"
do
if [[ $repo =~ $ext$ ]]; then
load_themes+=(
${(@f)"$( \
__zplug::utils::shell::expand_glob "${repo}" "(N-.)"
)"}
)
fi
done
reply=()
[[ -n $load_themes ]] && reply+=( load_themes "${(F)load_themes}" )
return 0
}

@ -146,7 +146,6 @@ __zplug::sources::oh-my-zsh::load_theme()
return 1
fi
__zplug::core::tags::parse "$repo"
tags[dir]="${$(
__zplug::core::core::run_interfaces \
'dir' \