awk/variables
This commit is contained in:
parent
fd281ee8d0
commit
40bd26f9ce
2 changed files with 8 additions and 2 deletions
|
@ -58,6 +58,10 @@ BEGIN {
|
||||||
if (match($0, RE_FUNCTION, m)) {
|
if (match($0, RE_FUNCTION, m)) {
|
||||||
print m[1]
|
print m[1]
|
||||||
}
|
}
|
||||||
|
} else if (action == "variables") {
|
||||||
|
if (match($0, RE_CONSTANT, m)) {
|
||||||
|
print m[1]
|
||||||
|
}
|
||||||
} else if (action == "aliases functions") {
|
} else if (action == "aliases functions") {
|
||||||
if (match($0, RE_ALIAS, m)) {
|
if (match($0, RE_ALIAS, m)) {
|
||||||
append(m[1])
|
append(m[1])
|
||||||
|
|
|
@ -246,8 +246,10 @@ rwx_parse_functions() {
|
||||||
"${_rwx_code_awk}"
|
"${_rwx_code_awk}"
|
||||||
}
|
}
|
||||||
rwx_parse_variables() {
|
rwx_parse_variables() {
|
||||||
printf "%s" "${_rwx_code}" |
|
rwx_code |
|
||||||
sed --silent "s|${RWX_REGEX_TARGET_VARIABLE}|\\1|p"
|
awk \
|
||||||
|
--assign action="variables" \
|
||||||
|
"${_rwx_code_awk}"
|
||||||
}
|
}
|
||||||
|
|
||||||
# ╭──────┬─────╮
|
# ╭──────┬─────╮
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue