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:
parent
859bd6c6d7
commit
81f04ce3e9
@ -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' \
|
||||
|
Loading…
Reference in New Issue
Block a user