context/interactive

This commit is contained in:
Marc Beninca 2025-07-09 20:42:41 +02:00
parent 8ed00e1788
commit b1fc5bf235
Signed by: marc.beninca
GPG key ID: 9C7613450C80C24F

View file

@ -263,17 +263,17 @@ EOF
"bash" | "dash" | "sh") unset command ;;
*) ;;
esac
# context / shell
if rwx_shell_interactive; then
# display help
rwx_code_help
# context / command
if [ -n "${command}" ]; then
else
local function
# find the matching function
function="$(rwx_code_command_function "${command}")"
if [ -n "${function}" ]; then
"${function}" "${@}"
fi
# context / shell
else
# display help
rwx_code_help
fi
}