From d367548c08a658d37c4003a05bf4d5ff0f706746 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 6 Jul 2025 04:21:03 +0200 Subject: [PATCH] types --- sh/doc.awk | 4 ++++ sh/main.sh | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/sh/doc.awk b/sh/doc.awk index ad2132d..fcfc317 100644 --- a/sh/doc.awk +++ b/sh/doc.awk @@ -56,20 +56,24 @@ BEGIN { } } else if (match($0, RE_SET, m)) { if (m[1] == target) { + print "set" output(m[1]) } else { reset() } } else if (match($0, RE_FUNCTION, m)) { if (alias) { + print "alias" output(target) } else if (m[1] == target) { + print "function" output(target) } else { reset() } } else { if (module) { + print "module" output(target) } else { reset() diff --git a/sh/main.sh b/sh/main.sh index 5e7de9e..fb323d8 100755 --- a/sh/main.sh +++ b/sh/main.sh @@ -1,9 +1,8 @@ #! /usr/bin/env sh -# main module - # ╭──────╮ # │ main │ # ╰──────╯ +# main module # ╭──────┬───────────╮ # │ main │ constants │ @@ -11,8 +10,10 @@ # name of the entrypoint file RWX_MAIN_NAME="main.sh" +# name of the project itself RWX_SELF_NAME="rwx" +# prefix for command functions RWX_SELF_COMMAND="_${RWX_SELF_NAME}_cmd_" # ╭──────┬───────────╮