filter/variables
This commit is contained in:
parent
65d701556a
commit
705e86f18b
2 changed files with 4 additions and 4 deletions
|
@ -47,7 +47,7 @@ BEGIN {
|
|||
RE_MODULE = RE_BEGIN "#\\." RE_SPACES RE_ANY RE_END
|
||||
RE_SHEBANG = RE_BEGIN "#!" RE_SPACES RE_ANY RE_END
|
||||
RE_TASK = RE_BEGIN RE_SPACES "#" RE_SPACES RE_TSK RE_ANY RE_END
|
||||
RE_VARIABLE = RE_BEGIN RE_VAR RE_SET RE_END
|
||||
re["variable"] = RE_BEGIN RE_VAR RE_SET RE_END
|
||||
|
||||
f = ""
|
||||
match_alias = 0
|
||||
|
@ -98,7 +98,7 @@ BEGIN {
|
|||
match_task = 0
|
||||
}
|
||||
} else if (action == "variables") {
|
||||
if (match($0, RE_VARIABLE, m)) {
|
||||
if (match($0, re["variable"], m)) {
|
||||
print m[1]
|
||||
}
|
||||
} else if (action == "aliases functions") {
|
||||
|
@ -167,7 +167,7 @@ BEGIN {
|
|||
} else {
|
||||
reset()
|
||||
}
|
||||
} else if (match($0, RE_VARIABLE, m)) {
|
||||
} else if (match($0, re["variable"], m)) {
|
||||
if (m[1] == target) {
|
||||
output(m[1], "variable")
|
||||
} else {
|
||||
|
|
|
@ -256,7 +256,7 @@ EOF
|
|||
# parse tasks
|
||||
_rwx_code_tasks="$(rwx_code_parse "tasks")"
|
||||
# parse variables
|
||||
_rwx_code_variables="$(rwx_code_parse "variables")"
|
||||
_rwx_code_variables="$(rwx_code_action_target "filter" "variable")"
|
||||
}
|
||||
|
||||
rwx_code_parse() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue