self/command
This commit is contained in:
parent
b61ec7044d
commit
52b6c06cb1
2 changed files with 4 additions and 4 deletions
|
@ -7,7 +7,7 @@
|
|||
RWX_MAIN_NAME="main.sh"
|
||||
RWX_SELF_NAME="rwx"
|
||||
|
||||
RWX_PREFIX_COMMAND="_${RWX_SELF_NAME}_cmd_"
|
||||
RWX_SELF_COMMAND="_${RWX_SELF_NAME}_cmd_"
|
||||
|
||||
# ╭───────────╮
|
||||
# │ variables │
|
||||
|
@ -151,7 +151,7 @@ rwx_main() {
|
|||
local argument="${0}"
|
||||
local function name
|
||||
name="$(basename "${argument}")"
|
||||
function="${RWX_PREFIX_COMMAND}${name}"
|
||||
function="${RWX_SELF_COMMAND}${name}"
|
||||
"${function}" "${@}"
|
||||
;;
|
||||
esac
|
||||
|
|
|
@ -3,9 +3,9 @@ rwx_self_commands() {
|
|||
grep \
|
||||
--directories "recurse" \
|
||||
--no-filename \
|
||||
"^${RWX_PREFIX_COMMAND}" "${RWX_ROOT_SYSTEM}" |
|
||||
"^${RWX_SELF_COMMAND}" "${RWX_ROOT_SYSTEM}" |
|
||||
cut --delimiter "(" --fields 1 |
|
||||
sed "s|^${RWX_PREFIX_COMMAND}||"
|
||||
sed "s|^${RWX_SELF_COMMAND}||"
|
||||
}
|
||||
|
||||
# get functions from root
|
||||
|
|
Loading…
Reference in a new issue