This commit is contained in:
parent
80949cf6c0
commit
5225d6a1ae
2 changed files with 29 additions and 33 deletions
|
@ -57,18 +57,6 @@ rwx_code_cache_user() {
|
|||
echo "${rwx_code_cache_user}"
|
||||
}
|
||||
|
||||
# ╭──────┬──────╮
|
||||
# │ code │ help │
|
||||
# ╰──────┴──────╯
|
||||
|
||||
# output help message
|
||||
rwx_code_help() {
|
||||
rwx_log "" \
|
||||
"rwx_… = functions" \
|
||||
" a__… = aliases" \
|
||||
" u__… = user"
|
||||
}
|
||||
|
||||
# ╭──────┬─────────╮
|
||||
# │ code │ install │
|
||||
# ╰──────┴─────────╯
|
||||
|
@ -296,25 +284,4 @@ ${rwx_code_modules_user}
|
|||
EOF
|
||||
# load code cache
|
||||
rwx_code_load
|
||||
# context / shell
|
||||
if rwx_shell_interactive; then
|
||||
# display help
|
||||
rwx_code_help
|
||||
# context / command
|
||||
else
|
||||
local command
|
||||
local function
|
||||
# command name used to run
|
||||
# (stripped from hyphen interactive flag)
|
||||
command="$(basename "${0}" | sed "s|^-||")"
|
||||
case "${command}" in
|
||||
"bash" | "dash" | "sh") unset command ;;
|
||||
*) ;;
|
||||
esac
|
||||
# find the matching function
|
||||
function="$(rwx_code_command_function "${command}")"
|
||||
if [ -n "${function}" ]; then
|
||||
"${function}" "${@}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue