mawk/functions
This commit is contained in:
parent
601eef2326
commit
933fb93907
1 changed files with 5 additions and 5 deletions
|
@ -23,7 +23,7 @@ function extract(string, type) {
|
|||
split(string, array, "#/")
|
||||
return trim(array[2])
|
||||
} else if (type == "function") {
|
||||
split(string, array, "()")
|
||||
split(string, array, "(")
|
||||
return trim(array[1])
|
||||
} else if (type == "module") {
|
||||
split(string, array, "#\\.")
|
||||
|
@ -124,12 +124,12 @@ BEGIN {
|
|||
match_task = 0
|
||||
}
|
||||
} else if (action == "aliases functions") {
|
||||
if (match($0, re["alias"], m)) {
|
||||
append(m[1])
|
||||
} else if (match($0, re["function"], m)) {
|
||||
if (match($0, re["alias"])) {
|
||||
append(extract($0, "alias"))
|
||||
} else if (match($0, re["function"])) {
|
||||
split(doc, array, "\n")
|
||||
for (item in array) {
|
||||
alias_eval(array[item], m[1], "function")
|
||||
alias_eval(array[item], extract($0, "function"), "function")
|
||||
}
|
||||
reset()
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue