prefix
This commit is contained in:
parent
163ff926cd
commit
1e1954ce9b
1 changed files with 5 additions and 2 deletions
|
@ -7,6 +7,8 @@
|
|||
RWX_MAIN_NAME="main.sh"
|
||||
RWX_SELF_NAME="rwx"
|
||||
|
||||
RWX_PREFIX_COMMAND="${RWX_SELF_NAME}_cmd_"
|
||||
|
||||
# ╭───────────╮
|
||||
# │ variables │
|
||||
# ╰───────────╯
|
||||
|
@ -148,9 +150,10 @@ rwx_main() {
|
|||
;;
|
||||
*)
|
||||
local argument="${0}"
|
||||
local name
|
||||
local function name
|
||||
name="$(basename "${argument}")"
|
||||
"rwx_cmd_${name}" "${@}"
|
||||
function="${RWX_PREFIX_COMMAND}${name}"
|
||||
"${function}" "${@}"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue