Files
dokku/plugins/trace/internal-functions
Jose Diaz-Gonzalez 1cb586b2e7 refactor: standardize command naming
This standardization makes it somewhat easier to read stacktraces as the command names are all uniform, so it will be slightly easier to scan trace output.
2020-02-09 22:41:39 -05:00

29 lines
703 B
Bash
Executable File

#!/usr/bin/env bash
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
trace_help_content_func() {
declare desc="return trace plugin help content"
cat <<help_content
trace, [DEPRECATED] Enables/Disables trace mode
trace:on, Enable trace mode
trace:off, Disable trace mode
help_content
}
cmd-trace-help() {
if [[ $1 == "trace:help" ]]; then
echo -e 'Usage: dokku trace[:COMMAND]'
echo ''
echo 'Manage trace mode'
echo ''
echo 'Additional commands:'
trace_help_content_func | sort | column -c2 -t -s,
elif [[ $(ps -o command= $PPID) == *"--all"* ]]; then
trace_help_content_func
else
cat <<help_desc
trace, Manage trace mode
help_desc
fi
}