From 96bf706e3295622bfe7c9d8b377600fe9cd1a3d6 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 6 Jul 2025 04:40:46 +0200 Subject: [PATCH 1/2] alias,printf --- sh/doc.awk | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sh/doc.awk b/sh/doc.awk index ad3360e..a6920b4 100644 --- a/sh/doc.awk +++ b/sh/doc.awk @@ -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() From b0afca09a56e3046a2e218911eb1efac7190959e Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 6 Jul 2025 04:43:37 +0200 Subject: [PATCH 2/2] shebang --- sh/doc.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sh/doc.awk b/sh/doc.awk index a6920b4..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)) {