28 lines
462 B
Bash
28 lines
462 B
Bash
#!/usr/bin/env bash
|
|
# commands/runtime/exec.command.sh
|
|
|
|
function cmd::runtime::exec::on_load() {
|
|
flag::register --debug
|
|
}
|
|
|
|
function cmd::runtime::exec::run() {
|
|
if [[ $# -eq 0 ]]; then
|
|
cmd::runtime::exec::help
|
|
return 1
|
|
fi
|
|
|
|
runtime::exec "$@"
|
|
}
|
|
|
|
function cmd::runtime::exec::help() {
|
|
cat <<EOF
|
|
Usage: dx exec <cmd> [args...]
|
|
|
|
Runs a command inside the runtime.
|
|
|
|
Examples:
|
|
dx exec ls -la
|
|
dx exec php --version
|
|
dx exec composer install
|
|
EOF
|
|
}
|