commands/eval
This commit is contained in:
parent
d80b61f490
commit
ffdfe0fc90
2 changed files with 2 additions and 4 deletions
|
@ -96,7 +96,7 @@ BEGIN {
|
||||||
} else if (match($0, RE_FUNCTION, m)) {
|
} else if (match($0, RE_FUNCTION, m)) {
|
||||||
split(doc, array, "\n")
|
split(doc, array, "\n")
|
||||||
for (item in array) {
|
for (item in array) {
|
||||||
print array[item] " " m[1]
|
eval(array[item], m[1])
|
||||||
}
|
}
|
||||||
reset()
|
reset()
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -196,9 +196,7 @@ EOF
|
||||||
# parse commands functions
|
# parse commands functions
|
||||||
_rwx_code_commands_functions="$(rwx_code_parse "commands functions")"
|
_rwx_code_commands_functions="$(rwx_code_parse "commands functions")"
|
||||||
while IFS= read -r line; do
|
while IFS= read -r line; do
|
||||||
text="$(echo "${line}" | sed "s| |() { |")"
|
eval "${line}"
|
||||||
text="${text} \"\${@}\"; }"
|
|
||||||
eval "${text}"
|
|
||||||
done <<EOF
|
done <<EOF
|
||||||
${_rwx_code_commands_functions}
|
${_rwx_code_commands_functions}
|
||||||
EOF
|
EOF
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue