filters=("$@")
while IFS= read -r line; do
- if [[ ${line} = @begin* ]]; then
+ if [[ ${line} = @if* ]]; then
+ line=${line#@if }
+ for name in "${filters[@]}"; do
+ if [[ ${line} = ${name}' '* ]]; then
+ echo "${line#${name} }"
+ fi
+ done
+ elif [[ ${line} = @begin* ]]; then
set ${line}; shift
filter=
for name in "${filters[@]}"; do