awk/constants
This commit is contained in:
parent
dbfe0e1407
commit
fd281ee8d0
2 changed files with 11 additions and 5 deletions
|
@ -50,6 +50,10 @@ BEGIN {
|
||||||
if (match($0, RE_ALIAS, m)) {
|
if (match($0, RE_ALIAS, m)) {
|
||||||
print m[1]
|
print m[1]
|
||||||
}
|
}
|
||||||
|
} else if (action == "constants") {
|
||||||
|
if (match($0, RE_CONSTANT, m)) {
|
||||||
|
print m[1]
|
||||||
|
}
|
||||||
} else if (action == "functions") {
|
} else if (action == "functions") {
|
||||||
if (match($0, RE_FUNCTION, m)) {
|
if (match($0, RE_FUNCTION, m)) {
|
||||||
print m[1]
|
print m[1]
|
||||||
|
|
12
sh/main.sh
12
sh/main.sh
|
@ -222,23 +222,25 @@ EOF
|
||||||
_rwx_code_variables="$(rwx_parse_variables)"
|
_rwx_code_variables="$(rwx_parse_variables)"
|
||||||
}
|
}
|
||||||
rwx_parse_aliases() {
|
rwx_parse_aliases() {
|
||||||
echo "${_rwx_code}" |
|
rwx_code |
|
||||||
awk \
|
awk \
|
||||||
--assign action="aliases" \
|
--assign action="aliases" \
|
||||||
"${_rwx_code_awk}"
|
"${_rwx_code_awk}"
|
||||||
}
|
}
|
||||||
rwx_parse_aliases_functions() {
|
rwx_parse_aliases_functions() {
|
||||||
printf "%s" "${_rwx_code}" |
|
rwx_code |
|
||||||
awk \
|
awk \
|
||||||
--assign action="aliases functions" \
|
--assign action="aliases functions" \
|
||||||
"${_rwx_code_awk}"
|
"${_rwx_code_awk}"
|
||||||
}
|
}
|
||||||
rwx_parse_constants() {
|
rwx_parse_constants() {
|
||||||
printf "%s" "${_rwx_code}" |
|
rwx_code |
|
||||||
sed --silent "s|${RWX_REGEX_TARGET_CONSTANT}|\\1|p"
|
awk \
|
||||||
|
--assign action="constants" \
|
||||||
|
"${_rwx_code_awk}"
|
||||||
}
|
}
|
||||||
rwx_parse_functions() {
|
rwx_parse_functions() {
|
||||||
echo "${_rwx_code}" |
|
rwx_code |
|
||||||
awk \
|
awk \
|
||||||
--assign action="functions" \
|
--assign action="functions" \
|
||||||
"${_rwx_code_awk}"
|
"${_rwx_code_awk}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue