Compare commits

..

No commits in common. "bb787cc0cce83cbe978cf7d14f8ac16014238474" and "beb3025828c5298b12c925ee5ddc4116a7c8b916" have entirely different histories.

2 changed files with 4 additions and 33 deletions

View file

@ -7,6 +7,7 @@ function append(line) {
function output(name) {
print name
print "↓"
print doc
exit
}
@ -44,7 +45,7 @@ BEGIN {
} else if (match($0, RE_DOC, m)) {
append(m[1])
} else if (match($0, RE_ALIAS, m)) {
append("alias: " m[1])
append(m[1])
if (m[1] == target) {
alias = 1
}
@ -56,24 +57,20 @@ 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,8 +1,9 @@
#! /usr/bin/env sh
# main module
# ╭──────╮
# │ main │
# ╰──────╯
# main module
# ╭──────┬───────────╮
# │ main │ constants │
@ -10,10 +11,8 @@
# 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_"
# ╭──────┬───────────╮
@ -195,31 +194,6 @@ rwx_parse_functions() {
sed --silent "s|${RWX_REGEX_TARGET_FUNCTION}|\\1|p"
}
# ╭──────┬──────╮
# │ main │ test │
# ╰──────┴──────╯
rwx_test() {
local item
# TODO CODE
# TODO CONSTANTS
# TODO functions
# TODO variables
set \
"main" \
"self" \
\
"RWX_MAIN_NAME" \
\
"rwx_cache" \
\
"gsc"
for item in "${@}"; do
echo
rwx_doc "${item}"
done
}
# ╭──────┬─────╮
# │ main │ run │
# ╰──────┴─────╯