This commit is contained in:
Marc Beninca 2025-07-06 04:21:03 +02:00
parent ec9907d450
commit d367548c08
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F
2 changed files with 7 additions and 2 deletions

View file

@ -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()

View file

@ -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_"
# ╭──────┬───────────╮