From 457d82fade78b62dbfe91bf902505ebaf0496899 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 13 Jul 2025 21:39:54 +0200 Subject: [PATCH] mawk/commands --- sh/core/code.awk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sh/core/code.awk b/sh/core/code.awk index ee26ed1..2c267e8 100644 --- a/sh/core/code.awk +++ b/sh/core/code.awk @@ -136,12 +136,12 @@ BEGIN { reset() } } else if (action == "commands functions") { - if (match($0, re["command"], m)) { - append(m[1]) - } else if (match($0, re["function"], m)) { + if (match($0, re["command"])) { + append(extract($0, "command")) + } 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 {