mirror of
https://github.com/zplug/zplug
synced 2025-11-13 20:47:12 +01:00
- Cutting out the tag-related code in each external files - like `commands` and `options` - All developers have to do simply add tag file beginning(ending) in two underscores
22 lines
361 B
Bash
22 lines
361 B
Bash
#!/bin/zsh
|
|
|
|
__import "core/core"
|
|
__import "print/print"
|
|
|
|
local arg="$1" tag
|
|
local -a tags
|
|
|
|
if [[ -z $arg ]]; then
|
|
__zplug::print::print::die "[zplug] $funcstack[1]: too few arguments\n"
|
|
return 1
|
|
fi
|
|
|
|
__zplug::core::core::get_tags
|
|
tags=( "${reply[@]}" )
|
|
|
|
reply=("name" "$arg")
|
|
for tag in "${tags[@]}"
|
|
do
|
|
reply+=("$tag" "$(__${tag}__ "$arg")")
|
|
done
|