diff --git a/sh/doc.awk b/sh/doc.awk index ad3360e..f36b7b6 100644 --- a/sh/doc.awk +++ b/sh/doc.awk @@ -40,7 +40,7 @@ BEGIN { { # doc if (match($0, RE_SHEBANG, m)) { - append(m[1]) + append("shebang: " m[1]) } else if (match($0, RE_DOC, m)) { append(m[1]) } else if (match($0, RE_ALIAS, m)) { @@ -56,24 +56,25 @@ BEGIN { } } else if (match($0, RE_SET, m)) { if (m[1] == target) { - print "set" + printf "set: " output(m[1]) } else { reset() } } else if (match($0, RE_FUNCTION, m)) { if (alias) { - print "alias" - output(target) + print "alias: " target + printf "function: " + output(m[1]) } else if (m[1] == target) { - print "function" + printf "function: " output(target) } else { reset() } } else { if (module) { - print "module" + printf "module: " output(target) } else { reset()