context/command
This commit is contained in:
parent
bcf879ddc3
commit
79a8584fde
1 changed files with 8 additions and 9 deletions
|
@ -296,8 +296,14 @@ ${rwx_code_modules_user}
|
||||||
EOF
|
EOF
|
||||||
# load code cache
|
# load code cache
|
||||||
rwx_code_load
|
rwx_code_load
|
||||||
# set command
|
# context / shell
|
||||||
|
if rwx_shell_interactive; then
|
||||||
|
# display help
|
||||||
|
rwx_code_help
|
||||||
|
# context / command
|
||||||
|
else
|
||||||
local command
|
local command
|
||||||
|
local function
|
||||||
# command name used to run
|
# command name used to run
|
||||||
# (stripped from hyphen interactive flag)
|
# (stripped from hyphen interactive flag)
|
||||||
command="$(basename "${0}" | sed "s|^-||")"
|
command="$(basename "${0}" | sed "s|^-||")"
|
||||||
|
@ -305,13 +311,6 @@ EOF
|
||||||
"bash" | "dash" | "sh") unset command ;;
|
"bash" | "dash" | "sh") unset command ;;
|
||||||
*) ;;
|
*) ;;
|
||||||
esac
|
esac
|
||||||
# context / shell
|
|
||||||
if rwx_shell_interactive; then
|
|
||||||
# display help
|
|
||||||
rwx_code_help
|
|
||||||
# context / command
|
|
||||||
else
|
|
||||||
local function
|
|
||||||
# find the matching function
|
# find the matching function
|
||||||
function="$(rwx_code_command_function "${command}")"
|
function="$(rwx_code_command_function "${command}")"
|
||||||
if [ -n "${function}" ]; then
|
if [ -n "${function}" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue