diff --git a/sh/code.awk b/sh/code.awk index 26f3cfc..7de8daf 100644 --- a/sh/code.awk +++ b/sh/code.awk @@ -96,7 +96,7 @@ BEGIN { } else if (match($0, RE_FUNCTION, m)) { split(doc, array, "\n") for (item in array) { - print array[item] " " m[1] + eval(array[item], m[1]) } reset() } else { diff --git a/sh/code.sh b/sh/code.sh index 3c033ea..29e4eec 100644 --- a/sh/code.sh +++ b/sh/code.sh @@ -196,9 +196,7 @@ EOF # parse commands functions _rwx_code_commands_functions="$(rwx_code_parse "commands functions")" while IFS= read -r line; do - text="$(echo "${line}" | sed "s| |() { |")" - text="${text} \"\${@}\"; }" - eval "${text}" + eval "${line}" done <