1
0
mirror of https://github.com/zplug/zplug synced 2025-11-13 20:47:12 +01:00
zplug/autoload/utils/__parser__
b4b4r07 5a6af793b0 Add new tag system
- 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
2016-02-26 16:45:54 +09:00

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