diff --git a/sh/code.awk b/sh/code.awk index 51afc9b..c68e746 100644 --- a/sh/code.awk +++ b/sh/code.awk @@ -49,8 +49,8 @@ BEGIN { f = "" match_alias = 0 match_command = 0 + match_module = 0 reset() - module = 0 } { @@ -154,7 +154,7 @@ BEGIN { } else if (match($0, RE_MODULE, m)) { reset() if (m[1] == target) { - module = 1 + match_module = 1 } } else if (match($0, RE_FUNCTION, m)) { f = m[1] @@ -172,7 +172,7 @@ BEGIN { reset() } } else { - if (module) { + if (match_module) { output(target, "module") } else { reset()